Chapter 10. Clustering JBoss AS 7 Applications

In the former chapters, we went through the most interesting aspects of Java Enterprise development. Once you are ready to rollout your applications, it is mandatory that you guarantee your customers a responsive and reliable environment. This requirement is usually achieved through application server clustering.

JBoss clustering is not the product of a single library or specification, but rather a blend of technologies. In this chapter, we will first introduce some basics about clustered programming. Next, we will quickly move to the cluster configuration and setup, which will be required to deploy some clustered applications.

Here is a preview of what we will learn from this unit:

  • What clustering is, and how JBoss AS implements it
  • Setting up a standalone and a domain of application server clusters
  • Developing clustered Java EE 6 applications in order to achieve load balancing and high availability

Clustering basics

A cluster of application servers consists of multiple server instances (cluster nodes) running simultaneously and working together to provide increased scalability and reliability. The nodes that make up the cluster can be located either on the same machine or on different machines. From the client's point of view, this is irrelevant because the cluster appears as a single server instance.

Introducing clustering in your applications will produce the following benefits:

  • Scalability: Adding a new node to a cluster should allow the overall system to service a higher client load than that provided by the simple basic configuration. Ideally, it should be possible to service any given load simply by adding the appropriate number of servers or machines.
  • Load balancing: In a clustered environment, the individual nodes composing the cluster should each process a fair share of the overall client load. This can be achieved by distributing client requests across multiple servers, which is also known as load balancing.
  • High availability: Applications running in a cluster can continue when a server instance fails. This is achieved because applications are deployed on multiple nodes of the cluster, and so if a server instance fails, another server instance on which that component is deployed can continue application processing.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.176.99