Hi all
I am moving a session by replicating it from one app server to another app
server when a certain scenario occurs.
However, now I would like the haproxy to redirect the traffic to the new app
server where the session resides.
When the certain scenario occurs, I am setting a cookie TRANSITION=X. Where X
is another node on which session has been replicated.
As an example, in the flow below, session is assigned to node A at the end of
first HTTP response. While processing second request on app server, I set the
TRANSITION=X cookie.
Is there a way by which haproxy can alter the node from A to node X in the
JSESSIONID cookie?
>-- GET /URI1 HTTP/1.0 ------------> |
( no cookie, haproxy forwards in load-balancing mode. )
| >-- GET /URI1 HTTP/1.0 ---------->
| X-Forwarded-For: 10.1.2.3
| <-- HTTP/1.0 200 OK -------------<
( no cookie, nothing changed )
<-- HTTP/1.0 200 OK ---------------< |
Set-Cookie: JSESSIONID=A~123 |
>-- GET /URI2 HTTP/1.0 ------------> |
Cookie: JSESSIONID=A~123 |
( the proxy sees the cookie, removes the server name and forwards
to server A which sees the same cookie as it previously sent )
| >-- GET /URI3 HTTP/1.0 ---------->
| Cookie: JSESSIONID=123
| X-Forwarded-For: 10.1.2.3
| <-- HTTP/1.0 200 OK -------------<
( no cookie, nothing changed )
<-- HTTP/1.0 200 OK ---------------< |
Set-Cookie: TRANSITION=X |
Set-Cookie: JSESSIONID=X~123 |
>-- GET /URI2 HTTP/1.0 ------------> |
Cookie: JSESSIONID=X~123 |
( the proxy sees the cookie, removes the server name and forwards
to server X)
regards
Jay Kulkarni
US: +1.6122220086
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com