Rate limiting via socket#899
Open
Dariquest wants to merge 4 commits intocloudfoundry:masterfrom
Open
Conversation
000e8d8 to
7cdd1d9
Compare
a3126b6 to
2815bf2
Compare
Rate limiting via socket Rate limiting via socket
add acceptance test for connection rate limit via socket Co-authored-by: Dariquest <daria.anton@sap.com> fix indentation in config enhance acceptance tests optimize acceptance for connection rate limiting via socket add root permission to socat
1b29569 to
d946c87
Compare
a18e
approved these changes
Apr 24, 2026
Contributor
a18e
left a comment
There was a problem hiding this comment.
Approval for CI - did not review yet.
a18e
reviewed
Apr 27, 2026
| tcp-request connection reject if { sc_conn_rate(0) gt <%= connections %> } | ||
| <%- end -%> | ||
| <%- end -%> | ||
| tcp-request connection reject if { var(proc.conn_rate_limit_enabled) -m bool } { sc_conn_rate(0),sub(proc.conn_rate_limit) gt 0 } |
Contributor
There was a problem hiding this comment.
Why do we substract instead of comparing directly? Did you test that this is more performant?
|
|
||
| By("Overriding the limit at runtime via socket to a higher value") | ||
| newLimit := connLimit * 3 | ||
| runHAProxySocketCommand(haproxyInfo, fmt.Sprintf("experimental-mode on; set var proc.conn_rate_limit int(%d)", newLimit)) |
Contributor
There was a problem hiding this comment.
Did you investigate what the drawbacks of experimental-mode are? Do we even still require this? How long will this stay experimental?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rate limiting can be configured via socket, so that it is possible to adjust rate limits when haproxy is under high load.