Limiting number of connections to upstream servers

Ryan Malayter malayter at gmail.com
Tue May 4 08:07:01 MSD 2010


A bit o

On Sunday, May 2, 2010, brama <nginx-forum at nginx.us> wrote:
> Nothing? Is there anything else I should be looking at to prevent overloading a backend?
>
> E.g. splitting off nginx configs into 1 instance for dynamic requests, and 1 for static requests? The dynamic requests nginx would then limit connections by setting worker.max_connections, and assuming it fairly distributes requests over the multiple (identical) backends?

It's a bit of a hack, but you could have nginx proxy to itself and
then to the backend. At the middle layer, you use connection limits.
You could probably even use error_page to have clients random wait and
retry if the backend was too busy.


-- 
RPM



More information about the nginx mailing list