httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anam Ali Khan <>
Subject Re: [users@httpd] Apache + Tomcat Load Balancing
Date Fri, 09 Mar 2012 14:43:45 GMT

I would recommend HAProxy as a load balancer in your PHP + JSP application environment. It
will work as follows:

1. First HAProxy will accept client request.
2. It will forward those requests to two machines via round robin 
3. Each WebServer must use mod_jkas a connector (module) for Apache/Tomcat communication and
session persistence.
4. HAproxy also perform health checking for two servers.


 From: Kashif Rahman <>
Sent: Friday, 9 March 2012, 11:36
Subject: [users@httpd] Apache + Tomcat Load Balancing

We have requirement for to load balance our PHP + JSP application. I need to know that how
can I load balance 2 Apache web Servers and 2 Tomcat Servers, 1st Web Server + Tomcat on 1st
machine and 2nd Web Server + Tomcat on 2nd machine. We want to use Proxy Load Balancer for
Apache to tomcat communication.
If we use single Apache Web Server and 2 tomcat instances on different machines, it seems
to be working and sharing session fine, but when we add 2nd apache web server to have fail
over for PHP too, tomcat stops replicating session? If anyone is running such type of setup
then kindly do let me know what could be the issues or anything missing. I am using Apache
WebServer as a load balancer for both Apache too.
Apache Webserver
 _____ |______
|                              |
Apache Webserver   Apache Webserver
|                              |
       Tomcat                   Tomcat        
What could be the recommended solution for this requirement?
Thank you,
Best Regards,

Kashif Rahman
Principal SCM Engineer
Vopium A/S | Office# 2, 7th Floor, Shaheen Complex | 38 Abbot Road
Lahore | Pakistan |t + 92 42 6316491 |f + 92 42 6316492
+ 92 334 9771227 |  kashif_r | w
View raw message