on 06-19-2015 7:57 AM
Hi Guys,
We have 2 tomcat nodes with BOE installed (say T1 and T2) and I have installed Apache on one server (say A1).
I have have implemented load balancing using mod_jk.Configured everything perfectly.
However I have some doubts, on whether tomcat load balacing is working properly or not.
When I send request to Apache (http://<apache>/BOE/CMC), its always goes to 'T1' server (i know that because in system field its always 'T1'). When I stop T1, apache pass the request to second server i.e T2.
So i am sure that Fail over is working, but how do I test Load Balancing?
As i said when both the Tomcat servers are up, apache always passes request to TOmcat 1 .
Should it not distribute the request between T1 and T2? Hence I am in a bit confusion whether load balancing is working or not.
Thanks,
RVS.
Hi Ritesh,
As per general topology rules, the load balancer will always send a request to a member of lowest distance. Only when all of those are broken, it will balance to the members of the next higher configured distance.
For more info, please go through below link:
https://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html
In addition to this, I think you are expecting corresponding CMS name should reflect in the system field when request goes through either Tomcat. If you use a BO cluster name instead you can avoid this confusion.
I hope this helps!
Regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mahesh,
I wanted to check whether load balancing is working or not, hence I was not using Clustername, and using hostnames instead.
My Idea was that when I send a response through Apache , I would see T1 and T2 in round robin fashion , which was not happening and hence the confusion.
But now its clear , I have understood how it works !
I have an jsp which appends session with the Tomcat name which was used to server the request.
Also learnt that apache has sticky load balancing(not much idea) , it does not follow uniform round robin .
As mentioned by Dennis, we can check the request using http://<tomcat>:<port>/manager/status
Regards,
RVS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you cannot see in CMC which tomcat is being used.
which system field you mean ?
If failover is working, then load balancing is fine. You can see where sessions go in tomcat build in tools Manager, on main/home page of tomcat you'll see link to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for replying Denis,
Yeah , I know we cant see in CMC which tomcat was used to server the request.
I was talking about the CMC/BI login page (system, username, passwd, auth) , I believe the system field is populated by the properties file using cms.default.
So I thought that when the request is sent to tomcat 1 it should show Tomcat 1 (in system filed as I have set cms.default =T1)and if request goes to Tomcat 2 its should show T2.
Regards,
RVS
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.