Chapter 17: Clustering Of course, when the master

Chapter 17: Clustering Of course, when the master server has crashed, it is too late to query it for information about what it was doing. In all likelihood, the crashed master server is not in any condition to respond. Therefore, almost all fail-over solutions rely on maintaining and sharing state information between the master and backup servers before any crashes occur. Keeping this information current is the only way to ensure that the backup server can take over from where the master server left off during a fail-over. This state sharing is much tougher to implement than it sounds. State information on a system refers to any changes to the system. On a hardware level, this could mean any memory or register write. Imagine having to let all servers in a cluster know about every register and memory write on the master system! Thankfully, in a Java EE compliant Servlet/JSP container, a well-accepted convention for tracking state information within Web applications is available. It involves the use of server-side sessions. Tomcat 6 s cluster implementation takes advantage of this to provide fail-over capability. Now it s time to see how Tomcat 6 incorporates the load-balancing, master-backup, and fail-over patterns in its clustering implementation to provide scalable HA features for end users. Tomcat 6 Clustering Model This section explores the specific clustering implementation supported by Tomcat 6. Based on the discussion thus far, the implementation can be divided into two layers and various components. Figure 17-4 illustrates this. Incoming requests STATE/SESSIONS SHARING Back-End (many choices of technology) LOAD BALANCING Front-End (many choices of technology) Tomcat Server Instances Figure 17-4: Tomcat 6 clustering-implementation architectural model The two layers that enable clustering are the load-balancing frontend and the state-sharing/synchronization backend. In particular, Tomcat s load-balancing frontend distributes incoming requests to the Tomcat instances, while the backend is concerned with ensuring that shared session data is available to the different instances.

For reliable and cheap web hosting services please check javaweb hosting website.

Comments are closed.