A Primer on J2EE Clusters for Webhosting - Advantages of Clusters
(Page 2 of 4 )
For a big Web project, the above mentioned advantages of clusters might prove to be vital prerequisites for success, rather than abstract benefits. Depending on the specifics of the application, the order of advantages might be reversed; there are times when high availability is more important than scalability, for example. What I mean is that the order in which different advantages are described, does not necessarily reflect their ranking of importance in all possible cases.
The ability to "plug-in" additional resources at any time, when more power is needed, without having to stop and restart the system, is one of the main advantages of clusters and distributed systems. With J2EE application servers, which can run on various platforms and operating systems (Windows, Linux, Solaris, etc.), scalability means that administrators are able to use less or more powerful, cheaper or more expensive equipment to achieve uninterrupted functioning of the system. Additionally, scalability allows administrators to easily add new services to the already existing ones, thus providing the opportunity to effortlessly integrate with existing systems.
Under most scenarios, high availability is the main advantage of clusters. High availability encompasses the periods during which the cluster is accessible and services clients' requests within a reasonable time. For non-critical applications, availability of 98 percent (i.e. about seven days a year cummulative downtime) might be acceptable, while for others availability of at least 99.99 percent (about 50 minutes a year cummulative downtime) is mandatory.
High availability is a prerequisite for the other two truly important cluster advantages: load balancing and fail over.
Load balancing allows incoming requests to be sent for processing to the least busy server in the cluster, thus increasing productivity and better utilizing available resources. If there is no single point of failure, load balancing can dramatically increase performance. A prerequisite for load balancing is the existence in the cluster of multiple copies of the object that can perform the particular job.
There are several algorithms for load balancing used by all or some of the J2EE application server vendors. Generally, these algorithms are: round-robin, weight-based, and random.
The round-robin load balancing algorithm is the simplest. It cycles through the list of active server instances and when a new request arrives, it is sent to the instance whose turn it is to service a request. Round-robin can be used for any type of clusterable objects.
The weight-based algorithm is more sophisticated. It calculates the load of different participants in the cluster and sends the request to the least busy one. Its implementation with different vendors differs, but usually can be used only for some of the clusterable objects, such as EJB or RMI objects.
The random load balancing algorithm, as the name implies, sends incoming requests to any server that is available in the cluster. Again, it is applicable only for EJB and RMI objects.
Fail Over and Redundancy
Fail over means that if one of the participants in the cluster (a server or a dispatcher) is temporarily or permanently unavailable, its functions are undertaken by another participant. The result is that incoming requests are automatically redirected to a running server, without interruption in service.
For true fail over and redundancy, there must not be a single point of failure in the system. This means that if the database, for instance, is the bottleneck, no application server's cluster solution can compensate for this. Also, hardware and connectivity requirements must be taken into account when planning for faill over and redundancy.
Managing the cluster from a centralized control point is easier than managing standalone servers as separate machines. Integrated administration gives at a glance the complete view of all critical components, allowing administrators to fine-tune their performance. The tools for remote administration and cluster-level log files also contribute to easier administration and increased efficiency.
More Web Hosting How-Tos Articles
More By Blue Moon