9

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.

Parag kale
  • 101
  • 1
  • 3
  • Have you seen this post? http://stackoverflow.com/questions/8750518/difference-between-global-maxconn-and-server-maxconn-haproxy – NickRamirez Dec 09 '16 at 03:19
  • 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. – Parag kale Dec 09 '16 at 17:07
  • 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. – NickRamirez Dec 09 '16 at 19:59
  • I get it. But how do I increase my kernel queue (I am using centos as proxy host) – Parag kale Dec 09 '16 at 21:32
  • To correct what I said before, adding "maxconn" to a "server" creates a queue in the backend, not just for that server. – Nick Ramirez Feb 20 '19 at 22:47
  • Does this answer your question? [Difference between global maxconn and server maxconn haproxy](https://stackoverflow.com/questions/8750518/difference-between-global-maxconn-and-server-maxconn-haproxy) – user5994461 May 06 '20 at 18:08

0 Answers0