How to enable sticky load balancing based on session IDs using apache mod_proxy_balancer

Our proxy configuration (in httpd.conf) for sending requests for 2 JBoss instances is given below based on mod_proxy_balancer

<Proxy balancer://mycluster>
Allow from all
BalancerMember http://192.168.1.2:9080
BalancerMember http://192.168.1.2:8080
</Proxy>

ProxyPass /app balancer://mycluster/app
ProxyPassReverse /app  http://192.168.1.2:9080/app
ProxyPassReverse /app  http://192.168.1.2:8080/app 

How to enable sticky load balancing based on session identifiers. Should I set the following flag as part of the proxy declaration? This does not seem to have any effect. How do I debug to make sure this works fine.

SetEnv BALANCER_SESSION_STICKY JSESSIONID

+3
source share
1 answer

PHP , JBoss. , jsessionid param/cookie. JBoss ( tomcat) .

jvmRoute = " server.xml. <attribute name="UseJK">false</attribute> jboss-service.xml " true".

mod_proxy JBoss.

+2

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


All Articles