Reg. automatic failover

Hi All,

I observed that automatic failover behaviour is not working with my
nginx
server.

/opt/nginx/sbin/nginx -v

nginx version: nginx/1.2.8

nginx server is running with following conf:

upstream lb_get {
server localhost:8031 ;
server localhost:8032 ;
}
server {
listen 8081;

}
location / {
proxy_pass http://lb_get;

}

I have two servers running as:
$ nc -kl 8031 $ nc -kl 8032

From another machine:

curl ‘http://192.168.2.94:8081

$ nc -kl 8031
GET / HTTP/1.0
Host: 192.168.2.94
X-Real-IP: 192.168.2.52
X-Forwarded-For: 192.168.2.52
Connection: close
User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Accept: /

But if I kill this server the curl client is also getting killed and its
not getting transferred to other server listening at 8032.

Can anyone provide me some insight on this issue.

Thanks
Eswar

Can anyone provide me some insight on this issue.

On 9 April 2013 13:35, ESWAR RAO [email protected] wrote:

Hi All,

I observed that automatic failover behaviour is not working with my nginx
server.

What you describe is exactly what I would expect. No HTTP-compliant
proxy would shunt an active connection, mid-request, over to another
backend once a TCP connection has been established, and any traffic
has been passed to it. The proxy has no way of knowing if the backend
has taken some non-idempotent action based on as much of the request
as managed to be communicated. Would you like it if your bank
re-dispatched “pay this bill” requests to multiple backends just
because one of them fell over? :wink:

What are your expectations here? Be clear!

Jonathan