Load Balancing Stickiness Strategies
Jira requires sticky HTTP sessions. Using a cookie strategy approach for this will give you more control over user IP changes that occur due to network or VPN configuration.
At minimum, you want the user to become sticky to a server during a browser session. To get the best distribution/stickiness ratio, use a session cookie lifetime with absent expire or expire = -1.
The following examples demonstrate session stickiness strategies using cookies with Apache 2.2.24 with mod_proxy_balancer, which is similar to other load balancer solutions. In the examples we use HTTP in backends, but the same applies for AJP connectors.
1) Specific load balancing cookie
This is the less intrusive approach where your load balancer creates a specific cookie to route all the requests from the same session to the same backend server.
In this example, we will instruct Apache to create a cookie called ROUTEID, and use it for stickysession.
mod_proxy_balancer with specific cookie
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED <Proxy balancer: //jira-cluster> BalancerMember http: //backend1:8090 route=perftest1 BalancerMember http: //backend2:8090 route=perftest2 </Proxy> ProxyPass / balancer: //jira-cluster/ stickysession=ROUTEID |
Comments
0 comments
Please sign in to leave a comment.