Hi,

i want to configure a rate limit (say 100 http req/sec) for each backend server like this:

 listen front
      bind :80
      balance leastconn
      server srv1 127.0.0.1:8000 limit 100
      server srv2 127.0.0.2:8000 limit 100

As far i can see rate limiting is only supported for frontends [1].
However,a long time ago, someone asked about the same question [2]. The proposed solution was a multi tier load balancing having an extra proxy per backend server, like this:

 listen front
      bind :80
      balance leastconn
      server srv1 127.0.0.1:8000 maxconn 100 track back1/srv
      server srv2 127.0.0.2:8000 maxconn 100 track back2/srv

   listen back1
      bind 127.0.0.1:8000
      rate-limit 10
      server srv 192.168.0.1:80 check

   listen back2
      bind 127.0.0.2:8000
      rate-limit 10
      server srv 192.168.0.2:80 check

Is there a better (new) way to do that? The old thread mentioned, its on the roadmap for 1.6.

 Cheers Stephan

--

[1] http://cbonte.github.io/haproxy-dconv/1.6/configuration.html#rate-limit
[2]
http://comments.gmane.org/gmane.comp.web.haproxy/9199

Reply via email to