Chapter 17: Clustering Load Balancing There are many
Chapter 17: Clustering Load Balancing There are many options for implementing the load-balancing frontend. What you should choose depends on your specific application. These alternatives include (but are not restricted to) the following: . Round-robin DNS, whereby a domain name resolution results in a set of IP addresses. . A hardware-based load balancer. . A software-based load balancer. See PLB (Pure Load Balancer), a popular open-source TCP-based load balancer available from http://plb.sunsite.dk/. Another one is mod_backhand , from backhand.org/mod_backhand/. Yet another software-based load balancer is balance , available from inlab.de/balance.html. . Apache mod_proxyor mod_jk as load balancer. A discussion and detailed comparison of all of these options is beyond the scope of this blog. However, the last option is covered in this chapter because it is the most popular and least expensive option with Tomcat 6 deployments. mod_proxy/mod_ jk Load Balancing and Sticky Sessions The mod_proxyor mod_jk load balancer distributes incoming requests in a round-robin manner among the available Tomcat workers, but will also respect a load factor that you can specify. In addition, these load balancers support sticky sessions. Understanding Sticky Sessions When sticky sessions (or session affinity) is enabled on mod_proxyor mod_jk, it ensures that all incoming requests with the same session are routed to the same Tomcat 6 worker. Figure 17-5 illustrates this concept. Request C No existing session AJP tomcat2 AJP tomcat3 AJP tomcat1 Session YSession X Request B Session Y Request A Session X mod_proxy or mod_jk Apache Figure 17-5: mod_jk2 load balancing with session affinity
For high quality java hosting services please check tomcat web hosting website.