Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using Apache mod_proxy_loadbalancer with 4 backend JBoss, here are the configuration in backend server:

<Proxy balancer://www>
   Allow from all                                    
  BalancerMember x.11:8080/APP  route=node11 timeout=600 ttl=7200
   BalancerMember x.12:8080/APP route=node12 timeout=600 ttl=7200
   BalancerMember x.12:8081/APP route=node122 timeout=600 ttl=7200
   BalancerMember x.14:8080/APP route=node14 timeout=600 ttl=7200
   ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid nofailover=On 
ProxyPass /APP balancer://www/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse /APP balancer://www/

Our problem is the requests not balancer, most of them goes to "node12", here are the status from balancer manager:

LoadBalancer Status for balancer://www
StickySession   Timeout FailoverAttempts    Method
JSESSIONID|jsessionid   0   3   byrequests

Worker URL  Route   RouteRedir  Factor  Set Status  Elected To  From
x.11:8080/APP    node11 1   0   Ok  6500    8.3M    33M
x.12:8080/APP   node12  1   0   Ok  5690    38M 8.2M
x.12:8081/APP   node122 1   0   Ok  6886    8.8M    35M
x.14:8080/APP   node14  1   0   Ok  6272    7.5M    35M

Does this means the load balancer not works when we using StickySessions? How can we make sure each server has same requests?

BTW: please replace x with 192.168.1 as serverfault doesn't allow add multi links. Thanks,


share|improve this question
Are those "elected to" and "elected from" stats for node12 correct? It looks like they should be reversed. – mahnsc Nov 1 '11 at 13:08

If you are load-balancing based on requests but are persisting based on sessionid, you are not really going to see evenly spread load-balancer statistics. Each user session contains a variable amount of requests (some users may have only ran through 3 or 4 pages on the site, some might have run through 15 pages, some user profiles have more data than others, etc.,).

That being said, looking at your lb stats output (and assuming the values for node12 are reversed), your requests do look fairly well-balanced, considering persistence is active.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.