1

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 
</Proxy>    
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,

Tang

1
  • Are those "elected to" and "elected from" stats for node12 correct? It looks like they should be reversed.
    – mahnsc
    Nov 1, 2011 at 13:08

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .