I've used peers for this situation personally.

Sent from Nine<http://www.9folders.com/>
________________________________
From: Aaron West <[email protected]>
Sent: Oct 18, 2017 5:33 AM
To: Devendra Joshi
Cc: HAProxy
Subject: Re: Force Sticky session on HaProxy

I've used something like this before:

stick store-response res.cook(JSESSIONID)
stick match req.cook(JSESSIONID)

"stick on" does this I think:

stick match req.cook(JSESSIONID)
stick store-request req.cook(JSESSIONID)

As the client doesn't have the cookie at the beginning of the
connection it has to wait to store it until it's received from the
server, I have a vague memory that I had issues with using simply
"stick on" for this so switched to the first method above.

There is a massive problem with my suggestion however, if you clear
the stick table or restart the service(Which will clear the stick
table) then users lose persistence until they close their browsers and
start a new session or the server issues a new cookie. Obviously
reloads while synchronising the stick table should be fine.

However, i'm sure there will be a far better solution so I'm just
starting the ball rolling really...

Aaron West

Loadbalancer.org Ltd.

www.loadbalancer.org<http://www.loadbalancer.org>

+1 888 867 9504 / +44 (0)330 380 1064
[email protected]

LEAVE A REVIEW | DEPLOYMENT GUIDES | BLOG


________________________________

Information in this e-mail may be confidential. It is intended only for the 
addressee(s) identified above. If you are not the addressee(s), or an employee 
or agent of the addressee(s), please note that any dissemination, distribution, 
or copying of this communication is strictly prohibited. If you have received 
this e-mail in error, please notify the sender of the error.

Reply via email to