round robin rule

Francis Daly francis at
Fri Oct 28 16:42:32 UTC 2016

On Tue, Oct 25, 2016 at 04:28:22PM -0700, Frank Liu wrote:

Hi there,

> If I configure one "upstream" with 2 servers and use the default round
> robin, will the traffic be balanced based on the upstream or the virtual
> servers. e.g.: if I configure 2 virtual host "server" blocks, both
> proxy_pass the same upstream, will the requests to each virtual host be
> balanced individually?

That sounds like it shouldn't be too difficult to test. Have your upstream
refer to two different nginx server blocks, and be able to identify in the
logs which server was used.

Then send a request to vhost1, to vhost2, to vhost1, and to vhost1
again. Did the first two to vhost1 go to the same upstream? And did the
last to vhost1 go to the other upstream?

I'll be interested in seeing your conclusions.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list