Sometimes users encounter issues caused by the Apache load balancer configuration. It is important to note that the wrong configuration will cause unstable operations on platform (for example: sometimes one click works, but sometimes it does not).
Below are 4 key Apache load balancer configuration tips:
1. Set SERVERID is mandatory for all the LB Service because the system dedicates use of this cookie to be LB. If you use AutoVue, you should use JSESSIONID as a sticky session for 3dspace LB, but the SERVERID setting is still needed.
2. The cookie's path is very important, especially for one domain for all the service. For this example, it is path=/3dspace
3. You should put the set-cookie inside the service's location (
4. At the balancer member settings, you do not provide the service name (/3dspace). Set the service name as proxypass/proxypassReverse to prevent some redirect issues.
Refer to this configuration example:
BalancerMember http://3dx.cloudzhy.com:9080 route=space1
BalancerMember http://3dx.cloudzhy.com:9081 route=space2
ProxySet stickysession=SERVERID
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
Header add Set-Cookie "SERVERID=3dspace.%{BALANCER_WORKER_ROUTE}e; path=/3dspace" env=BALANCER_ROUTE_CHANGED
ProxyPass balancer://spaceCluster/3dspace
ProxyPassReverse balancer://spaceCluster/3dspace
......
Tips and Tricks
