9 messages in ru.sysoev.nginxRe: Upstream (fair) with dead servers
FromSent OnAttachments
Kamil GorloJul 9, 2009 7:47 am 
Igor SysoevJul 9, 2009 7:56 am 
Kamil GorloJul 9, 2009 8:09 am 
Igor SysoevJul 9, 2009 8:14 am 
Kamil GorloJul 9, 2009 8:45 am 
Weibin YaoJul 9, 2009 7:34 pm 
Weibin YaoJul 9, 2009 7:58 pm 
Igor SysoevJul 10, 2009 3:20 am 
Kamil GorloJul 10, 2009 3:00 pm 
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: Upstream (fair) with dead serversActions...
From:Igor Sysoev (is@rambler-co.ru)
Date:Jul 9, 2009 7:56:38 am
List:ru.sysoev.nginx

On Thu, Jul 09, 2009 at 04:47:43PM +0200, Kamil Gorlo wrote:

Hi,

I have (possibly quite rare) situation where I have one upstream with two servers and I know that in any particular moment only one of those servers is running:

upstream blah { server server1; // when working, server2 is dead server server2; // when working, server1 is dead }

So, what I need is that Nginx will choose working backend (in this upstream), remembers it and choose it for every request till some failure on this server occurs. Then it tries other server in upstream, till it finds some working - and situation repeats. Is this possible?

No, nginx will send request on both servers in round robin mode. If one of them will fails, then nginx will resend the failed request to another server and mark the server as dead for fail_timeout time.

Maybe upstream_fair module with option no_rr will work for me (I am not sure)?

Cheers,