Skip to content

Commit

Permalink
Add support for configuring Patroni REST API request queue size.
Browse files Browse the repository at this point in the history
This introduces an optional `request_queue_size` parameter for the Patroni REST API, with a default value of 5. It controls the TCP socket queue size, and once full, additional requests will receive a "Connection denied" error.
  • Loading branch information
chobostar committed Jan 10, 2025
1 parent 36f8daf commit 645b326
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions automation/roles/patroni/templates/patroni.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ restapi:
# username: username
# password: password
{% endif %}
{% if patroni_restapi_request_queue_size is defined %}
request_queue_size: {{ patroni_restapi_request_queue_size |int }}
{% endif %}

{% if dcs_type == 'etcd' %}
etcd3:
Expand Down
1 change: 1 addition & 0 deletions automation/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ patroni_restapi_listen_addr: "0.0.0.0" # Listen on all interfaces. Or use "{{ in
patroni_restapi_port: 8008
patroni_restapi_username: "patroni"
patroni_restapi_password: "" # If not defined, a password will be generated automatically during deployment.
patroni_restapi_request_queue_size: 5
patroni_ttl: 30
patroni_loop_wait: 10
patroni_retry_timeout: 10
Expand Down

0 comments on commit 645b326

Please sign in to comment.