Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configuring Patroni REST API request queue size #867

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

chobostar
Copy link
Contributor

@chobostar chobostar commented Jan 10, 2025

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.

Motivation

The proposed change addresses an availability issue in Patroni's REST API caused by the low default TCP accept queue size (5), which can lead to frequent listen queue overflows under high load, such as HAProxy health checks. By introducing a configurable request_queue_size option, this fix ensures greater scalability and stability for high-traffic environments while maintaining backward compatibility with the default settings

References

patroni/patroni#2643

https://patroni.readthedocs.io/en/latest/yaml_configuration.html#rest-api

request_queue_size: (optional): Sets request queue size for TCP socket used by Patroni REST API. Once the queue is full, further requests get a “Connection denied” error. The default value is 5.

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.
@vitabaks
Copy link
Owner

Ok, thanks!

@vitabaks vitabaks merged commit ade9de8 into vitabaks:master Jan 11, 2025
15 checks passed
@chobostar chobostar deleted the queue-size branch January 13, 2025 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants