Load balancing with Apache 2.2 mod_proxy_ajp

The Apache 2.2 webserver has a module for proxiing AJP requests (mod_proxy_ajp). This module is delivered with the Apache webserver by default. Activating modules The following modules must be enabled to use the AJP proxy functionallity: mod_proxy mod_proxy_ajp mod_proxy_balancer To activate the modules uncomment the following lines in your httpd.conf configuration file (e.g. /opt/apache/conf/httpd.conf): LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so Configuring modules To configure the modules we create a new configuration file conf/ajp_proxy.conf in the apache directory and add the following line to our httpd.conf file: Include conf/ajp_proxy.conf First of all we put all configuration directives in[…]

Read more

Use Tomcat Connector for Load Balancing Glassfish or SJSAS

In this tutorial i describe how you can use the Tomcat Connector (mod_jk module) as a load balancer for the Glassfish or Sun Java System Application Server (SJSAS). It’s availabe as a loadable module for the Apache webserver and for the Microsoft IIS. The Tomcat Connector uses the packet oriented binary AJP13 protocol for the communication between the servlet container and the webserver. This architecture is optimized for speed and is much faster as a proxy configuration. Download components Download the actual mod_jk distribution for either Apache or IIS webserver. Download the actual Tomcat 5.5 distribution. Download commons-logging and commons-modeler[…]

Read more