Difference between Clustering and Load balancing

Discussions

EJB programming & troubleshooting: Difference between Clustering and Load balancing

  1. I use WebLogic 6.1 server with Sun Solaris.

    What is the difference between Clustering and Load balancing?

    I asked this question to several people, But no one gave reliable answer.

    Thanks

    Robot
  2. From the weblogic docs,

    "A WebLogic Server cluster is a group of servers that work together to provide a more scalable, more reliable application platform than a single server"

    Scalability is achieved by providing the ability to load balance (distribute) the requests between the servers in the cluster.

    High-Availability is achieved by handling the possible failure of a server in the pool.

    As you can see Load Balancing is used by Clustering to provide its ability to scale.
  3. A cluster is a group of replicated servers. Because there is more than one server, it is possible to load balance requests across them. In addition, a cluster means that the failure of one server does not mean the failure of the system. So, load balancing is just one of the features of a clusteed system, but there are others.
  4. well...load balancing also exists outside of clusters. In a typical web site you have a load balancer that balances requests across a set of web servers. There's no "clustering" going on in this situation.

    Clustering typically adds in other features which typically relate to high availability/ reliability.
  5. I agree with Matheww.

    We have Cisco load balancer, it balance's the load between 2 Sun solaris servers.Good 24*7 service.

    Clustering is not load balancing.

    If I have cisco load balancer, why I do I need to buy clustering license from BEA for $14k?

    I still dont get the right answer from anyone in this forum for my question.

    Thanks

    Robot
  6. If your application is stateful, Hardware Load Balancing cannot provide fail-over capabilities. Software Clustering provides this by performing session-state replication.

    Component(EJB/MDB) Clustering is another useful feature.
  7. As mentioned in my previous post clustering is defined by a group of servers working together to provide increased scalability and high availability.

    Increased scalability is provided by load balancing requests across the 'clustered' servers.

    Increased availabity is provided by session replication and component replication across the 'clustered' servers.

    Increased scalability can also be provided by a hardware or software Load balancer that lives outside the server cluster.

    All of these solutions have trade offs that should be considered when you design your system.

    http://e-docs.bea.com/wls/docs61/cluster/planning.html#1082408


  8. Srikanesh,

    What do you mean by stateful?Say, I have a .war file with servlets and JSP's? Is is stateless or stateful?

    I have .ear file with some EJB's including stateful session bean.Is is stateless or stateful?

    What is the criteria to define stateful and stateless?

    Thanks

    Robot
    • Clustering is NOT load balancing.
    • Suppose your mail server is running on three (3) server in cluster mode.These server will have three different IP. You will have to create three set of user whom you can allocate one fixed IP out of three IPs. In case one server is down, IP will transferred to another machine ( let us from server 2 to server 1) and all users of server 2 will shifted to server 1. Now the catch:-)

      • Load has not been balanced. Only in case case of fail-over, it allows you to migrate to the new machine not in case of overloading .
      • Now, if you increase the one more server then to accommodate 4th server, again you have to redistribute the user among 4 server which is logistically challenging too. We call this HARDCODED BLALANCING 

    • Clustering doesn't take care of health check. Clustering is always on HARDWARE level not on software level. Hence unless and until system crashes , request will go that particular ip irrespective application is running or not. In case of decent hardware, system will never fail ( which will give notion that application is not down ) and services to user will down.

    Phani Bhushan

    Viaedge Technologies