randomlize nginx round robin peers

Ning Wang renren.wangning at gmail.com
Mon Aug 22 08:21:54 UTC 2011


Hi guys, i found something interesting.

here is our web server architectures. NGX1, NGX2 and NGX3 has the same
nginx.conf file. In our production environment, there are more nginx and
Resin server.

               LVS
         /       |       \
     /           |          \
NGX1    NGX2    NGX3
     |\    \
     |   \        \
     |       \           \
Resin1   Resin2   Resin3

when network traffic is directed to lvs(round robin request dispatching
method), all the first hundreds of requests go to Server Resin1。Resin1 is
overloaded and crashed. Then request goes to Resin2, and Resin2 dies, and
then Resin3...

There are 9 NGX servers(of the same weights) and 8 nginx worker processes on
each NGX server. So all the first 8*9 requests all go to Resin1. Currently
we just patched the code to randomlize nginx round robin peers to solve this
problem temporarily。

Any one has a good idea? Thx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110822/0a5f542d/attachment.html>


More information about the nginx mailing list