[PATCH] Random peer selection for implicit upstream defined by proxy_pass

Anton Jouline juce66 at gmail.com
Sat Sep 15 16:21:32 UTC 2012

Done some additional testing and it looks good. Regular round-robin
upstream continues to work
as before, unaffected by the change. For implicit upstream via
proxy_pass - we get the random
distribution among available IPs.

Anything else you would like added/changed in the new patch?

Not sure it can be made much smaller... except maybe the expression to
choose a random
index could be simplified to use random() or ngx_random() function
instead of rand().


More information about the nginx-devel mailing list