This is the config I am using :
backend st_user-profile
stick-table type string size 100k expire 1s store http_req_rate(1s)
frontend user-web-fe
bind *:443 ssl crt /etc/haproxy/secure.org.com.pem no-sslv3
acl host_service_pt hdr(host) service-pt.org.com
acl restricted_swagger_page url_beg /swagger-ui.html /v2/api-docs
http-request deny if restricted_swagger_page
acl user-profile url_beg /user/profile/meta/app/v4
acl st_user-profile_limit str("/user/profile/meta/app/v4"),table_http_req_rate(st_user-profile) gt 1000
http-request track-sc0 str("/user/profile/meta/app/v4") table st_user-profile if !st_user-profile_limit host_service_pt user-profile
http-request deny deny_status 429 if st_user-profile_limit host_service_pt user-profile capture request header True-Client-IP len 64
reqadd X-Forwarded-Proto:\ https
use_backend service-be-pt if host_service_pt
backend service-be-pt
balance leastconn
server service-t-1 127.0.0.1:31121 check
server service-t-2 127.0.0.2:31121 check
This is my haproxy config for a service that i am doing PT for in my org , but i am seeing strange behaviour it’s not working in case of traffic surge
what wrong i am doing here ?
rate limit should be 1000 , but its coming around 300-400 only for 2000 request per second
attaching images