haproxy issue with request headers
When doing several attempts to login to erp5 at the same time (20 users or more), haproxy corrupts around 20% of the requests bad-inserting the http-send-name-header key-value. Changing the way this information is passed in the request avoids the issue.
- Last updated by Sebastien Robin
44 43 {% for address, connection_count, webdav in backend_list -%} 45 44 {% if webdav %}{% do has_webdav.append(None) %}{% endif -%} 46 45 {% set server_name = name ~ '-' ~ loop.index0 -%} 46 http-request set-header X-Balancer-Current-Server {{ server_name }} - Contributor
This is going to generate such configuration :
listen user bind 10.0.15.62:2152 http-request set-header X-Balancer-Current-Cookie SERVERID http-request set-header X-Balancer-Current-Server user-0 server user-0 10.0.5.183:2200 cookie user-0 check inter 3s rise 1 fall 2 maxqueue 5 maxconn 1 http-request set-header X-Balancer-Current-Server user-1 server user-1 10.0.5.183:2201 cookie user-1 check inter 3s rise 1 fall 2 maxqueue 5 maxconn 1
haproxy.cfg is a configuration file, it's not a script that would be executed line by line. Thus there is good chance that your change works only in the case we have a single server in the backend...
- Developer
I agree, I had wrongly read.
- Developer
I see. So, this doesn't have the same behavior of "http-send-name-header X-Balancer-Current-Server". I'll investigate if there is a another way to pass the server name using a different keyword in the default part.
- Contributor
Roque, only good way is to go to discuss with haproxy guys
Please register or sign in to reply Status changed to closed
- You're only seeing other activity in the feed. To add a comment, switch to one of the following options.