2 messages in ru.sysoev.nginxRe: Does order of servers in upstream...
FromSent OnAttachments
Yusuf GoolamabbasSep 1, 2006 6:39 am 
Igor SysoevSep 1, 2006 10:16 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Does order of servers in upstream directive matter ?Actions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Sep 1, 2006 10:16:12 am
List:ru.sysoev.nginx

On Fri, 1 Sep 2006, Yusuf Goolamabbas wrote:

From my reading of the upstream directive documentation (albeit via babelfish)

http://sysoev.ru/nginx/docs/http/ngx_http_upstream.html

I can't determine if the order of server names/IP in the upstream directive matter. does nginx balance the connections randomly (assuming no weight's are provided or is it round-robin) if I have 2 nginx instances should I keep

server A;server B; in one instance and server B; server A in the other instance

The requests are balanced in round-robin mode. If you have

upstream one { server A; server B; server C; }

then 1st request goes to A, 2nd goes to B, 3rd goes to C, and 4th goes again to A.

If the 2nd request failed on upstream B, then it will be passed to the next upstream C. If it will failed on C too, then it will be passed to A. If it will failed again, the failure will be reported to a client.