<quote who="muell...@math.hu-berlin.de">
> Hey list,
>
> I am looking for a way to limit HTTP connections for a server which is
> part of several backends. I have a configuration like this:
>
> backend be1
>    server srv1 192.168.0.1 maxconn 100
>    server srv2 192.168.0.2 maxconn 100
>
> backend be2
>    balance uri whole
>    server srv1 192.168.0.1 maxconn 100
>    server srv2 192.168.0.2 maxconn 100
>
> Only some requests (based on req header and uri) need to be sticky, but I
> want a "global" connection limit for srv1 of 100. With the above config it
> would be 2 x 100.
>
> Is there some way to achieve this, without putting all the logic into one
> big backend?

Ok, I can just use "stick on" to put everything into one backend:

backend be
   acl be_sticky ...
   stick on path if be_sticky
   balance leastcon
   server srv1 192.168.0.1 maxconn 100
   server srv2 192.168.0.2 maxconn 100

But I have another situation, where I need an additional _per server_ rate
limit. I use an extra backend + proxy per server:

listen proxy_srv1
   bind 127.0.10.1
   rate-limit sessions 50
   server srv1 192.168.0.1

listen proxy_srv2
   bind 127.0.10.2
   rate-limit sessions 50
   server srv2 192.168.0.2

This works fine, but I want to maintain the total connection limit for the
servers as well. Any ideas?



Reply via email to