| |||||||||||
Tomcat - Load Balancing v Clustering Posted by admin (Graham Ellis), 11 June 2006 On last week's Apache httpd and Tomcat course, the majority of the delegates were concerned with sharing an intensive task between a number of servers due to potential loading issues.There are several ways of doing this. Using load balancing, requests are (re) written to different processors, and each processor handles the requests that it gets. Any changes that will effect subsequent requests are written back to a central database. Load Balancing can be undertaken by Tomcat itself, by an Apache httpd front end (good solution, that one), or by a hardware box that acts as a load balancer. If you're clever with your load balancer, you can ensure that the second and subsequent pages of a session are all called up from the same host on which the first page was generated, thus slashing the requirement to write back to the central database at every action. We have sample configuration files here and here to help you see how such a scheme works. If you need near-instant communication between all the processors - if, for example, you were running a very busy auction site, you might go for clustering instead. With Clustering, requests can be made of any of the Tomcat servers in your pool. All the servers broadcast changes made every (default) 500 ms, and the other servers keep note of the changes. Works well enough, but all the servers need to be on the same subnet, and the resource loading can be intrusive. There's a configuration sample here This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |