A cluster is a collection of linked servers, sometimes called nodes. Using clustering architecture to service client requests can have a number of benefits, including increased performance, availability, and reliability. Tomcat supports clustering through the use of a cluster element that can be included in a host or engine container. This implementation allows for the sharing of HTTP session information across a cluster.
Load balancing, which is the ability of a server to divide a workload among connected resources, is achieved in Tomcat through workers, which are server instances. Basic load balancing can be configured by designating a cluster of workers, with one worker configured as a load balancer. Using an extension module, the Apache Web Server can be used as a proxy server, handling traffic using the AJP13 protocol. The proxy server then passes all requests to the load balancer worker.
Note: Load balancing with the Apache Web Server acting as a proxy can only be accomplished with using the AJP13 protocol and its associated extension module. The HTTP extension module cannot be used for load balancing.