Amazon sticky load balancing session configuration for jsessionid in url

I am currently trying to configure Amazon Load Balancer for Tomcat workers, but I ran into one problem.

I use sticky sessions, and a cookie JSESSIONIDis available for most requests. But some requests contain session information in the URL, for example:

http://myserver.com/contextPath/someAction;jsessionid=BA6853C23F795BD5EEDAEA996E601BB8

And this does not work (and the request is sent to the wrong worker).

Does AWS load balancing support JSESSIONIDURLs? If not, maybe you know some workarounds?

With Apache + mod_proxy_balancer, I can, for example, define it as follows:

ProxyPassMatch /.* balancer://mycluster stickysession=JSESSIONID|jsessionid 
+3
source share
1 answer

AWS Resilient Load Balancer does not support URL-based session binding.

Be sure to check that you have set the ELB stickiness policy.

In addition, the stickiness of ELB does not actually look at the value of any cookie other than its own name “AWSELB”. When you set the cookie-based sticky policy, you really set the sticky lifetime to monitor the lifetime of the specified cookie, but the actual server destination is controlled by the AWSELB file.

+5
source

Source: https://habr.com/ru/post/1794175/


All Articles