Hi, Baptiste Hi, > > 1. you can use a client timeout (and a server timeout too) > > 2. You can use the "observe" feature for this purpose. Read the doc, > it points to a few other keyword which may help as well. > > Baptiste > >
Thanks for your answer If a client ( socket ) tries to connect to HA Proxy and all backend servers are DOWN , neither connection error (checking layer 4) or timeout happens because HA Proxy returns an EOF (better explained, my underlaying networking software returns EOF ) OK , I can detect this case but I don't like it , because I don't know what is returning an EOF ( HA Proxy / backend server ) The real problem is when a backend server goes DOWN after client sent data Client ( socket ) doesn't receive a "Connection reset" because it is still connected to HA Proxy I guess the underlaying networking software discards an incomplete data and returns an EOF . So, in the worst option, I can check if client gets an EOF and , in this case, to retry the connection I just wonder if it would be possible to transfer the connection errors when happening in HA-Proxy <--->backend link, to client . For example, Connection reset by peer, Connect refused , etc. Thanks > On Mon, Apr 22, 2013 at 6:26 PM, Jose María Zaragoza > <[email protected]> wrote: > > > > Hi: > > > > I've got basic questions about HA Proxy ( 1.4.22, 64 bit ) , running as > TCP > > proxy > > > > 1) My haproxy.cfg is like > > > > backend servers > > mode tcp > > balance roundrobin > > server machine1 machine1:4101 weight 50 check > > server machine2 machine2:4102 weight 50 check > > default-server slowstart 3000 > > > > > > When both of servers are DOWN , and a client opens a new connection, it > > never receives a 'Connection refused' . I guess that this client can > connect > > to haproxy, so that error doesn't happen > > > > How I can detect that all of servers are DOWN when a client (socket) > opens a > > connection ? > > > > > > 2) If both of servers are UP, and, suddenly, one of them goes DOWN , I > > would like a client ( TCP socket) who sent data by this connection, could > > know that response can contain corrupt data > > > > How I can detect that a current TCP connection went down ? > > So, I could to implement a retry > > > > > > Thanks and regards > > > > > > > > > > > > > > >

