Chapter 17: Clustering If you are configuring three physical machines, make sure that the web.xmlfile on each machine has the element added. Configuration Consistency The three clustered instances of Tomcat 6 should be identically configured, both software and hardware. This is a wise practice, in general, to reduce potential problems arising from dissimilar configuration. Typically, if the application or system requires machines with different hardware/software configurations, they are maintained in separate clusters (or in a nonclustered configuration). Common Front End: Load Balancing via Apache mod_ jk The load-balancing front end consists of an Apache server with mod_jkinstalled. The following is only a brief recap of the configuration procedure. See Chapter 11 for a detailed, step-by-step explanation of this configuration. Apache Server Configuration Make sure you are using the version of the mod_jk.so that supports your Apache server. Many problems may arise from version mismatch. The examples in this chapter are tested with Apache 2.2.3 (Win32) with mod_jk 1.2.19. On the Apache server side, if the mod_jk support is not included, you must make sure the mod_jkmodule is loaded at startup. This can be done by adding the following line to the conf/http.conffile: LoadModule jk_module modules/mod_jk.so This line should immediately follow all the LoadModule directives in the file. Note that the downloaded mod_jk library needs to be renamed to mod_jk.so. It should be placed in the modules directory of the Apache server. mod_ jk Configuration When the mod_jkmodule starts up, it looks for a workers.propertiesfile. The following workers .propertiesfile should be placed into the conf subdirectory of the Apache server: worker.list = bal1,stat1 worker.machine1.type = ajp13 worker.machine1.host = 192.168.23.2 worker.machine1.port = 8009 worker.machine1.lbfactor = 10 worker.machine2.type = ajp13 worker.machine2.host = 192.168.23.2 worker.machine2.port = 8109 worker.machine2.lbfactor = 10 worker.machine3.type = ajp13 worker.machine3.host = 192.168.23.2 worker.machine3.port = 8209 worker.machine3.lbfactor = 10 worker.bal1.type = lb (continued)
For reliable and cheap web hosting services please check cheap web hosting website.
This entry was posted
on Sunday, November 15th, 2009 at 7:31 pm and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.