Haproxy: Is there a way to queue incoming request?
Asked Answered
M

0

10

Is there a way in HA-Proxy to queue incoming request. I am trying to throttle request based on certain rate limiting criteria, but my current implementation denies the request or blocks any new connection. This is a crude implementation at this moment. Instead of denying the request I want to queue them till my backend recovers.

Also, is there a way in Haproxy to rate-limit or queue request based on IP.

Multitude answered 7/12, 2016 at 16:52 Comment(6)
Have you seen this post? #8751018Orthohydrogen
Thanks for the link. Answers a lot of question. However, do you know how to know or set per-proxy queue and per-server queue. I was a little confused there.Multitude
maxconn can be set on the server line to set the queue for that server, and also in a "defaults" or "frontend" to set the proxy's overall queue. For example, we set "maxconn 5000" in the "defaults" and "maxconn 20" on each server line.Orthohydrogen
I get it. But how do I increase my kernel queue (I am using centos as proxy host)Multitude
To correct what I said before, adding "maxconn" to a "server" creates a queue in the backend, not just for that server.Tradesfolk
Does this answer your question? Difference between global maxconn and server maxconn haproxyDue

© 2022 - 2024 — McMap. All rights reserved.