-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix(#8166): Update tune.bufsize and remove rsyslog from haproxy image #8170
Conversation
I've ran some scalability tests over this new config: https://docs.google.com/spreadsheets/d/1tWlECCmB9k7yXQ4cdS0wKHSQYDAsp0emFjRT-BiiCiY/edit?usp=sharing I am getting some errors - where haproxy sends 502s to api. |
I'd love some input on this. |
That's default behavior according to the docs. Do you think we should experiment with the double edged sword of |
I'm experimenting with buffer limit right now, I can try http-server-close as well. |
Ok, it turns out we already use Below are the results of running repeated scalability tests over two variants of this PR:
The "errors" are all identical:
Memory usage for haproxy after 4 scalability test runs is 3.64GiB. |
Looks like memory footprint plateaued at
|
I think I'm done with this. I've had this live on the scalability setup for a while (weeks?) and have been running scalability tests against it and it's been stable. Feedback / reviews please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you've extensively tested this and don't want to rock the boat, but I can't understand why our app would require these numbers, particularly the tune.buffers.limit
number. Have I missed something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. I wish there was a way to work out what the numbers should be but if this works in testing lets run with it, and look at removing haproxy altogether later.
Description
According to documentation, when increasing
tune.bufsize
,maxconn
should be decreased by the same factor, otherwise there is a risk of OOM.https://www.haproxy.com/documentation/hapee/latest/onepage/#3.2-tune.bufsize
In our config, we both increased maxconn and tune.bufsize by x 100. This caused the haproxy memory footprint to increase to up to 18GB. This memory is not released when connections are dropped and crashed instances that had a lower amount of available memory than this.
Additionally, this PR removes
rsyslog
from haproxy image. It was no longer needed, since docker logs are already enough for funnelling haproxy logs, and having the service running prevented the container from restarting when the main haproxy process ran out of memory.The container automatically restarts now, so setting a default resource limit to the container becomes an option.
#8166
Code review checklist
Compose URLs
If Build CI hasn't passed, these may 404:
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.