Hi Shweta,


> I have an active HTTP session serviced through the haproxy's virtual ip
> and load balanced to one of the virtual servers. If the master haproxy
> instance goes down in the middle of the active HTTP session, can the
> backup haproxy instance that takes over the virtual ip ,know that the
> session was terminated in the middle ? Will it try to initiate a new
> session with the other backend server without the user having to
> intervene and start a new session at the front end ?

No, there is no simply and efficient way to do that.



> I currently see that, when the master haproxy instance goes down, the
> active session is terminated. The backup haproxy instance takes over
> the virtual ip and only when the user tries to establish a new session,
> the backup haproxy connects the user to the backend server. Is this the
> expected behavior ?

Yes.



> What is achieved through the "peers" and "stick-table" command here ?

The content of the stick table is synchronized between the 2 haproxy
instances, so when the failover, or in a active-active design a request
hits a different haproxy instance, the informations in the stick-table
are available.

What that means exactly depends on what you are using the stick-table
for.

In your case, it seems you configured stick-tables and peer
synchronization, but are not actually using it.


Please see this article for an example to use client-ip persistence using
stick-tables:
http://blog.exceliance.fr/2013/04/22/client-ip-persistence-or-source-ip-hash-load-balancing/



Regards,

Lukas

                                          

Reply via email to