Load Balancing on JAS Server

max_xx

Well Known Member
Hi,

Does anybody have any idea how to do load balancing on JAS Server.

I'll briefly tell the scenario of our servers.
We have 3 JAS Servers with each JAS Server of a capacity of 60. All the Servers are on different machines.

There are many times cases, such as on one server there are more than 40 or 50 users while on the other server there are hardly 10 to 15 users.

Can we create a scenario where in we can keep a check on the number of users logging in the JAS Server.
Suppose we keep the check on number 30 for all the 3 servers. Now the total number of users on JAS SERVER 1 has reached 30, than the JAS Server 1 will check for the number of users on JAS Server 2 and 3 and accordingly it will transfer the new users to either 2 or 3. Similar case can be handled with JAS Server 2 as well as with 3.

Once the load is balanced, it will than start accepting calls for new users logged in.

Can anybody help me out ??

Do anybody has any document for this.

Thanx a lot in advance.

Regards,
-Irfan
 
We are planning on using the windows2003 load balancer to load balance between our 2 jas servers.
 
You can also employ a Cisco or radware router that has load balancing withing the unit. This hardware also can detect if a server fails and automatically route to other servers. If you are using HTTPS, it can get tricky depending on the release you are using because the earlier releases use absolute URL's
 
Have you tested the way sticky session work with Windows 2003 NLB? I had considered this as an alternative to other load balancing methods but I saw the Q&A below on a MS tech discussion. It appears that there is no timeout for sticky sessions. Sticky sessions or Affinity is required in order for E1 JAS caching to work properly. The load balancer should not timeout an HTTP session before the JAS timeout. e.g. if the JAS is configured to timeout after 30 minutes of inactivity then the load balancer should be set with a session affinity that lasts 30 minutes (I actually use 1 minute greater than the JAS timeout). It appears with NLB that the client is load balanced and affinity lasts as long as the cluster is up or until cluster members change. That last bit worries me in that it seems that changes to NLB cluster membership could cause the session to be redirected to another host. That session would be invalid on that JAS and the user would have to login again.

From: http://technet2.microsoft.com/WindowsServer/en/library/b8afa015-543d-4129-ac34-f64d45f52c751033.mspx?mfr=true
Support for Sessions
Updated: February 10, 2004
Q. Does NLB Support Sticky Sessions?

A. NLB supports limited forms of session stickiness:

• Single Affinity. When Single affinity is enabled, the clients port number isn’t used and the mapping algorithm uses the clients full IP address to determine load distribution. As a result, all requests from the same client always map to the same host within the cluster. Because there is no time-out value (typical of dispatcher-based implementations), this condition persists until cluster membership changes. However, session stickiness may not be preserved if the cluster membership changes, in particular when a new host is added to the cluster, or a host is re-added after being temporarily out of service.

• Class C Affinity. As in the case of Single affinity, client port numbers are not used to calculate load distribution. When Class C affinity is enabled, the mapping algorithm bases load distribution on the Class C portion (the upper 24 bits) of the clients IP address. As with Single affinity, sessions may not be preserved if the cluster membership changes.

• IPSec and VPN Sessions. On Windows Server 2003, NLB has specialized support for sticky IPSec and VPN sessions. NLB preserves these sessions even if the cluster membership changes.
 
I have worked with the following for load balancing JAS servers:

Cisco Content Switch
F5 Networks "BigIP"
IBM Edge Components

The IBM Edge Components come as part of the IBM Technology foundation. If you licensed the "Blue Stack" then it is included. It has some interesting facilities that I am just starting to play with. You can implement your own load balancing function in Java or use the default. By default it load balances both on users and on server load. It seems to monitor average CPU and use that in its calculations.

If you need your load balancing solution to be resilient you need to consider clustering your load balancing solution. With the three solutions I listed the traffic between the browser and the JAS is actually routed through the LB device/software. So you need to cluster the LB solution if you want high-availability.

The Windows 2003 NLB mentioned by mike_cnc_noob is interesting in that all the NLB servers participate in routing requests. So the JAS servers themselves would be part of the NLB cluster. I will be really interested to hear how Mike gets on with W2K3 NLB. It sounds like a nice self contained solution for those hosting the JAS on Windows.
 
We are using the Oracle Enterprise manager 10g on our web servers to cluster them which is supposed to do the load balancing aas well. Not sure how good it works as we are not live yet, but in testing we shut one server down and it routed users to the other, so it seems to work.
 
I tested:
1) Hardware Load Balance
- Radware
- Cisco
- Citrix
2) OS Load Balance
- W2K3 NLB
3) Software Load Balance
- WebSphere Deployment Manager
- Oracle Application 10g Load Balancer + WebCache

From administration perspective Hardware Load Balance are less intensive but they do not support session persistent.
NLB is not able to understand if a web application is down
Software load balance are most interesting architecture (especially Oracle 10g) but complex to administrate.
Gigi
 
Back
Top