Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Apache + Tomcat Load Balancing

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


kashif.rahman at vopium

Mar 8, 2012, 10:36 PM

Post #1 of 20 (1617 views)
Permalink
Apache + Tomcat Load Balancing

Hi,



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

Description: vopium_signature_logo



Vopium A/S | Office# 2, 7th Floor, Shaheen Complex | 38 Abbot Road

Lahore | Pakistan | t + 92 42 6316491 | f + 92 42 6316492



Description: imagesCAV9FMB1 + 92 334 9771227 | Description: imagesCAXWPPLS
kashif_r | w <http://www.vopium.com/> www.vopium.com
Attachments: image001.png (6.74 KB)
  image002.jpg (0.79 KB)
  image003.jpg (0.90 KB)


anamalikhan at yahoo

Mar 9, 2012, 6:43 AM

Post #2 of 20 (1594 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Hi,

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.

-Anam


________________________________
From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing


Hi,
 
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  www.vopium.com
Attachments: image001.png (6.74 KB)
  image002.jpg (0.79 KB)
  image003.jpg (0.90 KB)


kashif.rahman at vopium

Mar 12, 2012, 12:17 AM

Post #3 of 20 (1578 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
Communication and session persistence. Can it be done using our requirement?



Thank you,



Regards,

Kashif Rahman.



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Friday, March 09, 2012 7:44 PM
To: users [at] httpd
Cc: Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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_jk as a connector (module) for Apache/Tomcat
communication and session persistence.

4. HAproxy also perform health checking for two servers.



-Anam



_____

From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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


icicimov at gmail

Mar 12, 2012, 2:11 AM

Post #4 of 20 (1573 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

You can at least tell us what OS are these servers running on? Also you
said when you put second apache something is not working so we would like
to see your apache config if you dont mind. Another thing not clear to me
is tomcat session replication. Are the tomcats clustered? If not how do
they replicate the sessions between each other?
In meantime check mod_proxy_balancer documentation as possible solution.
You can find lots of examples with sticky sessions configuration fot this
module for tomcat backends.
On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

> Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
> Communication and session persistence. Can it be done using our requirement?
> ****
>
> ** **
>
> Thank you,****
>
> ** **
>
> Regards,****
>
> Kashif Rahman.****
>
> ** **
>
> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
> *Sent:* Friday, March 09, 2012 7:44 PM
> *To:* users [at] httpd
> *Cc:* Kashif Rahman
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> Hi,****
>
> ** **
>
> 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_jk* as a connector (module) for
> Apache/Tomcat communication and session persistence.****
>
> 4. HAproxy also perform health checking for two servers.****
>
> ** **
>
> -Anam****
>
> ** **
> ------------------------------
>
> *From:* Kashif Rahman <kashif.rahman [at] vopium>
> *To:* users [at] httpd
> *Sent:* Friday, 9 March 2012, 11:36
> *Subject:* [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> Hi,****
>
> ****
>
> 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 2
> nd 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****
>
> ** **
>


icicimov at gmail

Mar 12, 2012, 2:13 AM

Post #5 of 20 (1570 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Also read about mod_proxy_ajp
On Mar 12, 2012 8:11 PM, "Igor Cicimov" <icicimov [at] gmail> wrote:

> You can at least tell us what OS are these servers running on? Also you
> said when you put second apache something is not working so we would like
> to see your apache config if you dont mind. Another thing not clear to me
> is tomcat session replication. Are the tomcats clustered? If not how do
> they replicate the sessions between each other?
> In meantime check mod_proxy_balancer documentation as possible solution.
> You can find lots of examples with sticky sessions configuration fot this
> module for tomcat backends.
> On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium>
> wrote:
>
>> Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
>> Communication and session persistence. Can it be done using our requirement?
>> ****
>>
>> ** **
>>
>> Thank you,****
>>
>> ** **
>>
>> Regards,****
>>
>> Kashif Rahman.****
>>
>> ** **
>>
>> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
>> *Sent:* Friday, March 09, 2012 7:44 PM
>> *To:* users [at] httpd
>> *Cc:* Kashif Rahman
>> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>>
>> ** **
>>
>> Hi,****
>>
>> ** **
>>
>> 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_jk* as a connector (module) for
>> Apache/Tomcat communication and session persistence.****
>>
>> 4. HAproxy also perform health checking for two servers.****
>>
>> ** **
>>
>> -Anam****
>>
>> ** **
>> ------------------------------
>>
>> *From:* Kashif Rahman <kashif.rahman [at] vopium>
>> *To:* users [at] httpd
>> *Sent:* Friday, 9 March 2012, 11:36
>> *Subject:* [users [at] http] Apache + Tomcat Load Balancing****
>>
>> ** **
>>
>> Hi,****
>>
>> ****
>>
>> 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 2
>> nd 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****
>>
>> ** **
>>
>


kashif.rahman at vopium

Mar 12, 2012, 3:17 AM

Post #6 of 20 (1576 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Here what I have used :



==================



ProxyRequests Off

<Proxy *>

AddDefaultCharset Off

Order deny,allow

Allow from all

</Proxy>

ProxyPass /balancer-manager !

ProxyPass /examples balancer://qawebcluster/examples

ProxyPassReverse /examples balancer://qawebcluster/examples

ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin

ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin



#ProxyPass /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

#ProxyPassReverse /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

ProxyPass /kashif balancer://qawebcluster/kashif

ProxyPassReverse /kashif balancer://qawebcluster/kashif

ProxyPass /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

ProxyPassReverse /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

<Proxy balancer://qawebcluster>

BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On

BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On

ProxySet lbmethod=byrequests

</Proxy>



ProxyPreserveHost Off

ProxyStatus On



==================

We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
tomcat on each.



We are using mod_proxy_ajp



Tomcat is clustered. Session replication works, if single Apache is handling
2 tomcat instances. When we start second Apache, tomcat session replication
stops. We want to have failover for PHP side too.



Thank you,



Regards,

Kashif Rahman.



From: Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Monday, March 12, 2012 2:12 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



You can at least tell us what OS are these servers running on? Also you said
when you put second apache something is not working so we would like to see
your apache config if you dont mind. Another thing not clear to me is tomcat
session replication. Are the tomcats clustered? If not how do they replicate
the sessions between each other?
In meantime check mod_proxy_balancer documentation as possible solution. You
can find lots of examples with sticky sessions configuration fot this module
for tomcat backends.

On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
Communication and session persistence. Can it be done using our requirement?



Thank you,



Regards,

Kashif Rahman.



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Friday, March 09, 2012 7:44 PM
To: users [at] httpd
Cc: Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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_jk as a connector (module) for Apache/Tomcat
communication and session persistence.

4. HAproxy also perform health checking for two servers.



-Anam



_____

From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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


anamalikhan at yahoo

Mar 12, 2012, 9:40 AM

Post #7 of 20 (1594 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Hello,

It looks like very complex configuration in your application environment. You can achieve the same with HAProxy example as given before.

Why opt for complex configuration instead of easy available solution.

Thanks,
Anam



________________________________
From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Monday, 12 March 2012, 15:17
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing


Here what I have used :
 
==================
 
ProxyRequests Off
        <Proxy *>
          AddDefaultCharset Off
          Order deny,allow
          Allow from all
        </Proxy>
        ProxyPass /balancer-manager !
        ProxyPass /examples balancer://qawebcluster/examples
        ProxyPassReverse /examples balancer://qawebcluster/examples
        ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin
        ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin
 
        #ProxyPass /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
        #ProxyPassReverse /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
        ProxyPass /kashif balancer://qawebcluster/kashif
        ProxyPassReverse /kashif balancer://qawebcluster/kashif
        ProxyPass /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
        ProxyPassReverse /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
       <Proxy balancer://qawebcluster>
          BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On
          BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On
          ProxySet lbmethod=byrequests
        </Proxy>
 
ProxyPreserveHost Off
ProxyStatus On
 
==================
We have this config on WEB1 as WEB2 both.  3 machines involved. 1 Apache only for load balancing and 2 machines as WEB1 and WEB2 having Apache and tomcat on each.
 
We are using mod_proxy_ajp
 
Tomcat is clustered. Session replication works, if single Apache is handling 2 tomcat instances. When we start second Apache, tomcat session replication stops. We want to have failover for PHP side too.
 
Thank you,
 
Regards,
Kashif Rahman.
 
From:Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Monday, March 12, 2012 2:12 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing
 
You can at least tell us what OS are these servers running on? Also you said when you put second apache something is not working so we would like to see your apache config if you dont mind. Another thing not clear to me is tomcat session replication. Are the tomcats clustered? If not how do they replicate the sessions between each other?
In meantime check mod_proxy_balancer documentation as possible solution. You can find lots of examples with sticky sessions configuration fot this module for tomcat backends.
On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat Communication and session persistence. Can it be done using our requirement?
 
Thank you,
 
Regards,
Kashif Rahman.
 
From:Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Friday, March 09, 2012 7:44 PM
To: users [at] httpd
Cc: Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing
 
Hi,
 
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_jk as a connector (module) for Apache/Tomcat communication and session persistence.
4. HAproxy also perform health checking for two servers.
 
-Anam
 

________________________________

From:Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing
 
Hi,
 
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


tevans.uk at googlemail

Mar 12, 2012, 9:48 AM

Post #8 of 20 (1572 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo> wrote:
> Hello,
>
> It looks like very complex configuration in your application environment.
> You can achieve the same with HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd
server with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to
configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


kashif.rahman at vopium

Mar 12, 2012, 2:45 PM

Post #9 of 20 (1570 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

So what solution you would recommend and what is best option for session sharing?

Thank you,

Best Regards,

Kashif Rahman

-----Original Message-----
From: Tom Evans [mailto:tevans.uk [at] googlemail]
Sent: Monday, March 12, 2012 9:49 PM
To: users [at] httpd; Anam Ali Khan
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo> wrote:
> Hello,
>
> It looks like very complex configuration in your application environment.
> You can achieve the same with HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd server with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


anamalikhan at yahoo

Mar 13, 2012, 2:13 AM

Post #10 of 20 (1556 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

First check Apache supports session stickness in PHP application environment, if yes then you can go with your current configuration instead of HAproxy.

-Anam


________________________________
From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd; 'Anam Ali Khan' <anamalikhan [at] yahoo>
Sent: Tuesday, 13 March 2012, 2:45
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

So what solution you would recommend and what is best option for session sharing?

Thank you,

Best Regards,

Kashif Rahman

-----Original Message-----
From: Tom Evans [mailto:tevans.uk [at] googlemail]
Sent: Monday, March 12, 2012 9:49 PM
To: users [at] httpd; Anam Ali Khan
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo> wrote:
> Hello,
>
> It looks like very complex configuration in your application environment.
> You can achieve the same with HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd server with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


anamalikhan at yahoo

Mar 13, 2012, 11:07 AM

Post #11 of 20 (1562 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Dear Kashif, as per your comments below:

 
We are using mod_proxy_ajp
 
Tomcat is clustered. Session replication works, if single Apache is handling 2 tomcat instances. When we start second Apache, tomcat session
replication stops. We want to have failover for PHP side too.

Why are you using mod_proxy_ajp module. You should use mod_proxy_balancer. For PHP load balancing and session stickiness it can easily be implemented using cookie based approach.

And one more interesting thing is that you should use less request counting method to handle Load Balancing efficiently.

Please follow the documentation carefully. You can achieve your goal instead of HAproxy solution.

Thanks,
Anam




________________________________
From: Anam Ali Khan <anamalikhan [at] yahoo>
To: Kashif Rahman <kashif.rahman [at] vopium>; "users [at] httpd" <users [at] httpd>
Sent: Tuesday, 13 March 2012, 14:13
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing


First check Apache supports session stickness in PHP application environment, if yes then you can go with your current configuration instead of HAproxy.

-Anam


________________________________
From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd; 'Anam Ali Khan' <anamalikhan [at] yahoo>
Sent: Tuesday, 13 March 2012, 2:45
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

So what solution you would recommend and what is best option for session sharing?

Thank you,

Best Regards,

Kashif Rahman

-----Original Message-----
From: Tom Evans [mailto:tevans.uk [at] googlemail]
Sent: Monday, March 12, 2012 9:49 PM
To: users [at] httpd; Anam Ali Khan
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo> wrote:
> Hello,
>
> It looks like very complex configuration in your application environment.
> You can achieve the same with
HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd server with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


anamalikhan at yahoo

Mar 13, 2012, 11:10 AM

Post #12 of 20 (1556 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Last but not the least mod_proxy_balancer supports AJP protocol :)

-Anam



________________________________
From: Anam Ali Khan <anamalikhan [at] yahoo>
To: "users [at] httpd" <users [at] httpd>; Kashif Rahman <kashif.rahman [at] vopium>
Sent: Tuesday, 13 March 2012, 23:07
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing


Dear Kashif, as per your comments below:

 
We are using mod_proxy_ajp
 
Tomcat is clustered. Session replication works, if single Apache is handling 2 tomcat instances. When we start second Apache, tomcat session
replication stops. We want to have failover for PHP side too.

Why are you using mod_proxy_ajp module. You should use mod_proxy_balancer. For PHP load balancing and session stickiness it can easily be implemented using cookie based approach.

And one more interesting thing is that you should use less request counting method to handle Load Balancing efficiently.

Please follow the documentation carefully. You can achieve your goal instead of HAproxy solution.

Thanks,
Anam




________________________________
From: Anam Ali Khan <anamalikhan [at] yahoo>
To: Kashif Rahman <kashif.rahman [at] vopium>; "users [at] httpd" <users [at] httpd>
Sent: Tuesday, 13 March 2012, 14:13
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing


First check Apache supports session stickness in PHP application environment, if yes then you can go with your current configuration instead of HAproxy.

-Anam


________________________________
From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd; 'Anam Ali Khan' <anamalikhan [at] yahoo>
Sent: Tuesday, 13 March 2012, 2:45
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

So what solution you would recommend and what is best option for session sharing?

Thank you,

Best Regards,

Kashif Rahman

-----Original Message-----
From: Tom Evans [mailto:tevans.uk [at] googlemail]
Sent: Monday, March 12, 2012 9:49 PM
To: users [at] httpd; Anam Ali Khan
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo> wrote:
> Hello,
>
> It looks
like very complex configuration in your application environment.
> You can achieve the same with
HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd server with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


kashif.rahman at vopium

Mar 13, 2012, 11:50 PM

Post #13 of 20 (1555 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Hi,



I am using mod_proxy_balancer, because in that case I would be able to
handle load balancing or failover. I followed this URL:



http://www.johnandcailin.com/blog/john/scaling-drupal-step-two-sticky-load-b
alancing-apache-modproxy



for php. I have placed PHP sessions on mounted location and it is working
fine. Also both Apache(WEB1, WEB2) servers again using mod_proxy_balancer to
load balance tomcat instances. If we enable WEB2 then tomcat loses sessions.



Thank you,



Best Regards,

Kashif Rahman



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Tuesday, March 13, 2012 11:11 PM
To: users [at] httpd; Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Last but not the least mod_proxy_balancer supports AJP protocol :)



-Anam



_____

From: Anam Ali Khan <anamalikhan [at] yahoo>
To: "users [at] httpd" <users [at] httpd>; Kashif Rahman
<kashif.rahman [at] vopium>
Sent: Tuesday, 13 March 2012, 23:07
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Dear Kashif, as per your comments below:



We are using mod_proxy_ajp



Tomcat is clustered. Session replication works, if single Apache is handling
2 tomcat instances. When we start second Apache, tomcat session replication
stops. We want to have failover for PHP side too.

Why are you using mod_proxy_ajp module. You should use mod_proxy_balancer.
For PHP load balancing and session stickiness it can easily be implemented
using cookie based approach.

And one more interesting thing is that you should use less request counting
method to handle Load Balancing efficiently.

Please follow the documentation carefully. You can achieve your goal instead
of HAproxy solution.

Thanks,
Anam



_____

From: Anam Ali Khan <anamalikhan [at] yahoo>
To: Kashif Rahman <kashif.rahman [at] vopium>; "users [at] httpd"
<users [at] httpd>
Sent: Tuesday, 13 March 2012, 14:13
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



First check Apache supports session stickness in PHP application
environment, if yes then you can go with your current configuration instead
of HAproxy.



-Anam



_____

From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd; 'Anam Ali Khan' <anamalikhan [at] yahoo>
Sent: Tuesday, 13 March 2012, 2:45
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing


So what solution you would recommend and what is best option for session
sharing?

Thank you,

Best Regards,

Kashif Rahman

-----Original Message-----
From: Tom Evans [mailto:tevans.uk [at] googlemail]
Sent: Monday, March 12, 2012 9:49 PM
To: users [at] httpd; Anam Ali Khan
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

On Mon, Mar 12, 2012 at 4:40 PM, Anam Ali Khan <anamalikhan [at] yahoo>
wrote:
> Hello,
>
> It looks like very complex configuration in your application environment.
> You can achieve the same with HAProxy example as given before.
>
> Why opt for complex configuration instead of easy available solution.
>
> Thanks,
> Anam
>

Your non-complex solution involves replacing the load balancing httpd server
with a load balancing HAProxy server.

I fail to see how that decreases complexity. You have to learn how to
configure two things, instead of one thing twice.

HAProxy also cannot serve static files, whilst a load balancing httpd can.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


icicimov at gmail

Mar 14, 2012, 2:20 AM

Post #14 of 20 (1540 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Does the route parameters in the apache balancer tomcat1 and tomcat2 match
the jvmRoute value in the tomcat connectors?
On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

> Here what I have used :****
>
> ** **
>
> ==================****
>
> ** **
>
> ProxyRequests Off****
>
> <Proxy *>****
>
> AddDefaultCharset Off****
>
> Order deny,allow****
>
> Allow from all****
>
> </Proxy>****
>
> ProxyPass /balancer-manager !****
>
> ProxyPass /examples balancer://qawebcluster/examples****
>
> ProxyPassReverse /examples balancer://qawebcluster/examples****
>
> ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin****
>
> ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin***
> *
>
> ** **
>
> #ProxyPass /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> #ProxyPassReverse /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPass /kashif balancer://qawebcluster/kashif****
>
> ProxyPassReverse /kashif balancer://qawebcluster/kashif****
>
> ProxyPass /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPassReverse /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> <Proxy balancer://qawebcluster>****
>
> BalancerMember ajp://127.0.0.1:8009 route=tomcat1
> disablereuse=On****
>
> BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On*
> ***
>
> ProxySet lbmethod=byrequests****
>
> </Proxy>****
>
> ** **
>
> ProxyPreserveHost Off****
>
> ProxyStatus On****
>
> ** **
>
> ==================****
>
> We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
> only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
> tomcat on each.****
>
> ** **
>
> We are using mod_proxy_ajp****
>
> ** **
>
> Tomcat is clustered. Session replication works, if single Apache is
> handling 2 tomcat instances. When we start second Apache, tomcat session
> replication stops. We want to have failover for PHP side too. ****
>
> ** **
>
> Thank you,****
>
> ** **
>
> Regards,****
>
> Kashif Rahman.****
>
> ** **
>
> *From:* Igor Cicimov [mailto:icicimov [at] gmail]
> *Sent:* Monday, March 12, 2012 2:12 PM
> *To:* users [at] httpd
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> You can at least tell us what OS are these servers running on? Also you
> said when you put second apache something is not working so we would like
> to see your apache config if you dont mind. Another thing not clear to me
> is tomcat session replication. Are the tomcats clustered? If not how do
> they replicate the sessions between each other?
> In meantime check mod_proxy_balancer documentation as possible solution.
> You can find lots of examples with sticky sessions configuration fot this
> module for tomcat backends.****
>
> On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
> Communication and session persistence. Can it be done using our requirement?
> ****
>
> ****
>
> Thank you,****
>
> ****
>
> Regards,****
>
> Kashif Rahman.****
>
> ****
>
> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
> *Sent:* Friday, March 09, 2012 7:44 PM
> *To:* users [at] httpd
> *Cc:* Kashif Rahman
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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_jk* as a connector (module) for
> Apache/Tomcat communication and session persistence.****
>
> 4. HAproxy also perform health checking for two servers.****
>
> ****
>
> -Anam****
>
> ****
> ------------------------------
>
> *From:* Kashif Rahman <kashif.rahman [at] vopium>
> *To:* users [at] httpd
> *Sent:* Friday, 9 March 2012, 11:36
> *Subject:* [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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 2
> nd 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****
>
> ****
>


kashif.rahman at vopium

Mar 14, 2012, 2:26 AM

Post #15 of 20 (1537 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Yes I have that same in server.xml on both tomcats.



Thank you,



Best Regards,

Kashif Rahman



From: Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Wednesday, March 14, 2012 2:21 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



Does the route parameters in the apache balancer tomcat1 and tomcat2 match
the jvmRoute value in the tomcat connectors?

On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Here what I have used :



==================



ProxyRequests Off

<Proxy *>

AddDefaultCharset Off

Order deny,allow

Allow from all

</Proxy>

ProxyPass /balancer-manager !

ProxyPass /examples balancer://qawebcluster/examples

ProxyPassReverse /examples balancer://qawebcluster/examples

ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin

ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin



#ProxyPass /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

#ProxyPassReverse /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

ProxyPass /kashif balancer://qawebcluster/kashif

ProxyPassReverse /kashif balancer://qawebcluster/kashif

ProxyPass /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

ProxyPassReverse /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

<Proxy balancer://qawebcluster>

BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On

BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On

ProxySet lbmethod=byrequests

</Proxy>



ProxyPreserveHost Off

ProxyStatus On



==================

We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
tomcat on each.



We are using mod_proxy_ajp



Tomcat is clustered. Session replication works, if single Apache is handling
2 tomcat instances. When we start second Apache, tomcat session replication
stops. We want to have failover for PHP side too.



Thank you,



Regards,

Kashif Rahman.



From: Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Monday, March 12, 2012 2:12 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



You can at least tell us what OS are these servers running on? Also you said
when you put second apache something is not working so we would like to see
your apache config if you dont mind. Another thing not clear to me is tomcat
session replication. Are the tomcats clustered? If not how do they replicate
the sessions between each other?
In meantime check mod_proxy_balancer documentation as possible solution. You
can find lots of examples with sticky sessions configuration fot this module
for tomcat backends.

On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
Communication and session persistence. Can it be done using our requirement?



Thank you,



Regards,

Kashif Rahman.



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Friday, March 09, 2012 7:44 PM
To: users [at] httpd
Cc: Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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_jk as a connector (module) for Apache/Tomcat
communication and session persistence.

4. HAproxy also perform health checking for two servers.



-Anam



_____

From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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


icicimov at gmail

Mar 14, 2012, 2:48 AM

Post #16 of 20 (1536 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

What is in apache log file, any proxy errors? I would do some extra logging
if i was you as given in the below link:

http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_troubleshooting
On Mar 14, 2012 8:28 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

> Yes I have that same in server.xml on both tomcats.****
>
> ** **
>
> Thank you,****
>
> ** **
>
> Best Regards,****
>
> Kashif Rahman****
>
> ** **
>
> *From:* Igor Cicimov [mailto:icicimov [at] gmail]
> *Sent:* Wednesday, March 14, 2012 2:21 PM
> *To:* users [at] httpd
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> Does the route parameters in the apache balancer tomcat1 and tomcat2 match
> the jvmRoute value in the tomcat connectors?****
>
> On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Here what I have used :****
>
> ****
>
> ==================****
>
> ****
>
> ProxyRequests Off****
>
> <Proxy *>****
>
> AddDefaultCharset Off****
>
> Order deny,allow****
>
> Allow from all****
>
> </Proxy>****
>
> ProxyPass /balancer-manager !****
>
> ProxyPass /examples balancer://qawebcluster/examples****
>
> ProxyPassReverse /examples balancer://qawebcluster/examples****
>
> ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin****
>
> ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin***
> *
>
> ****
>
> #ProxyPass /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> #ProxyPassReverse /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPass /kashif balancer://qawebcluster/kashif****
>
> ProxyPassReverse /kashif balancer://qawebcluster/kashif****
>
> ProxyPass /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPassReverse /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> <Proxy balancer://qawebcluster>****
>
> BalancerMember ajp://127.0.0.1:8009 route=tomcat1
> disablereuse=On****
>
> BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On*
> ***
>
> ProxySet lbmethod=byrequests****
>
> </Proxy>****
>
> ****
>
> ProxyPreserveHost Off****
>
> ProxyStatus On****
>
> ****
>
> ==================****
>
> We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
> only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
> tomcat on each.****
>
> ****
>
> We are using mod_proxy_ajp****
>
> ****
>
> Tomcat is clustered. Session replication works, if single Apache is
> handling 2 tomcat instances. When we start second Apache, tomcat session
> replication stops. We want to have failover for PHP side too. ****
>
> ****
>
> Thank you,****
>
> ****
>
> Regards,****
>
> Kashif Rahman.****
>
> ****
>
> *From:* Igor Cicimov [mailto:icicimov [at] gmail]
> *Sent:* Monday, March 12, 2012 2:12 PM
> *To:* users [at] httpd
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> You can at least tell us what OS are these servers running on? Also you
> said when you put second apache something is not working so we would like
> to see your apache config if you dont mind. Another thing not clear to me
> is tomcat session replication. Are the tomcats clustered? If not how do
> they replicate the sessions between each other?
> In meantime check mod_proxy_balancer documentation as possible solution.
> You can find lots of examples with sticky sessions configuration fot this
> module for tomcat backends.****
>
> On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
> Communication and session persistence. Can it be done using our requirement?
> ****
>
> ****
>
> Thank you,****
>
> ****
>
> Regards,****
>
> Kashif Rahman.****
>
> ****
>
> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
> *Sent:* Friday, March 09, 2012 7:44 PM
> *To:* users [at] httpd
> *Cc:* Kashif Rahman
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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_jk* as a connector (module) for
> Apache/Tomcat communication and session persistence.****
>
> 4. HAproxy also perform health checking for two servers.****
>
> ****
>
> -Anam****
>
> ****
> ------------------------------
>
> *From:* Kashif Rahman <kashif.rahman [at] vopium>
> *To:* users [at] httpd
> *Sent:* Friday, 9 March 2012, 11:36
> *Subject:* [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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 2
> nd 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****
>
> ****
>


anamalikhan at yahoo

Mar 15, 2012, 10:13 AM

Post #17 of 20 (1539 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Do not use session replication/sharing, use session stickiness instead.

-Anam



________________________________
From: Igor Cicimov <icicimov [at] gmail>
To: users [at] httpd
Sent: Wednesday, 14 March 2012, 14:48
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing


What is in apache log file, any proxy errors? I would do some extra logging if i was you as given in the below link:
http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_troubleshooting

On Mar 14, 2012 8:28 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Yes I have that same in server.xml on both tomcats.

>Thank you,

>Best Regards,
>Kashif Rahman

>From:Igor Cicimov [mailto:icicimov [at] gmail]
>Sent: Wednesday, March 14, 2012 2:21 PM
>To: users [at] httpd
>Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

>Does the route parameters in the apache balancer tomcat1 and tomcat2 match the jvmRoute value in the tomcat connectors?
>On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
>Here what I have used :

>==================

>ProxyRequests Off
>        <Proxy *>
>          AddDefaultCharset Off
>          Order deny,allow
>          Allow from all
>        </Proxy>
>        ProxyPass /balancer-manager !
>        ProxyPass /examples balancer://qawebcluster/examples
>        ProxyPassReverse /examples balancer://qawebcluster/examples
>        ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin
>        ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin

>        #ProxyPass /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
>        #ProxyPassReverse /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
>        ProxyPass /kashif balancer://qawebcluster/kashif
>        ProxyPassReverse /kashif balancer://qawebcluster/kashif
>        ProxyPass /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
>        ProxyPassReverse /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
>       <Proxy balancer://qawebcluster>
>          BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On
>          BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On
>          ProxySet lbmethod=byrequests
>        </Proxy>

>ProxyPreserveHost Off
>ProxyStatus On

>==================
>We have this config on WEB1 as WEB2 both.  3 machines involved. 1 Apache only for load balancing and 2 machines as WEB1 and WEB2 having Apache and tomcat on each.

>We are using mod_proxy_ajp

>Tomcat is clustered. Session replication works, if single Apache is handling 2 tomcat instances. When we start second Apache, tomcat session replication stops. We want to have failover for PHP side too.

>Thank you,

>Regards,
>Kashif Rahman.

>From:Igor Cicimov [mailto:icicimov [at] gmail]
>Sent: Monday, March 12, 2012 2:12 PM
>To: users [at] httpd
>Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

>You can at least tell us what OS are these servers running on? Also you said when you put second apache something is not working so we would like to see your apache config if you dont mind. Another thing not clear to me is tomcat session replication. Are the tomcats clustered? If not how do they replicate the sessions between each other?
>In meantime check mod_proxy_balancer documentation as possible solution. You can find lots of examples with sticky sessions configuration fot this module for tomcat backends.
>On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
>Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat Communication and session persistence. Can it be done using our requirement?

>Thank you,

>Regards,
>Kashif Rahman.

>From:Anam Ali Khan [mailto:anamalikhan [at] yahoo]
>Sent: Friday, March 09, 2012 7:44 PM
>To: users [at] httpd
>Cc: Kashif Rahman
>Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

>Hi,

>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_jk as a connector (module) for Apache/Tomcat communication and session persistence.
>4. HAproxy also perform health checking for two servers.

>-Anam

>
>________________________________
>
>From:Kashif Rahman <kashif.rahman [at] vopium>
>To: users [at] httpd
>Sent: Friday, 9 March 2012, 11:36
>Subject: [users [at] http] Apache + Tomcat Load Balancing

>Hi,

>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



anamalikhan at yahoo

Mar 15, 2012, 10:16 AM

Post #18 of 20 (1531 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Why are you defining mod_proxy_balancer directives in WEB1 & WEB2. You only need to configure these in Apache Load Balancer machine.

Correct me if i am wrong.

-Anam



________________________________
From: Anam Ali Khan <anamalikhan [at] yahoo>
To: "users [at] httpd" <users [at] httpd>
Sent: Thursday, 15 March 2012, 22:13
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing


Do not use session replication/sharing, use session stickiness instead.

-Anam



________________________________
From: Igor Cicimov <icicimov [at] gmail>
To: users [at] httpd
Sent: Wednesday, 14 March 2012, 14:48
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing


What is in apache log file, any proxy errors? I would do some extra logging if i was you as given in the below link:
http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_troubleshooting

On Mar 14, 2012 8:28 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Yes I have that same in server.xml on both tomcats.

>Thank you,

>Best Regards,
>Kashif Rahman

>From:Igor Cicimov [mailto:icicimov [at] gmail]
>Sent: Wednesday, March 14, 2012 2:21 PM
>To: users [at] httpd
>Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

>Does the route parameters in the apache balancer tomcat1 and tomcat2 match the jvmRoute value in the tomcat connectors?
>On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
>Here what I have used :

>==================

>ProxyRequests Off
>        <Proxy *>
>          AddDefaultCharset Off
>          Order deny,allow
>          Allow from all
>        </Proxy>
>        ProxyPass /balancer-manager !
>        ProxyPass /examples balancer://qawebcluster/examples
>        ProxyPassReverse /examples balancer://qawebcluster/examples
>        ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin
>        ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin

>        #ProxyPass /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
>        #ProxyPassReverse /kashif balancer://qawebcluster/kashif stickysession=JSESSIONID|jsessionid
>        ProxyPass /kashif balancer://qawebcluster/kashif
>        ProxyPassReverse /kashif balancer://qawebcluster/kashif
>        ProxyPass /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
>        ProxyPassReverse /k balancer://qawebcluster/k stickysession=JSESSIONID|jsessionid
>       <Proxy balancer://qawebcluster>
>          BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On
>          BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On
>          ProxySet lbmethod=byrequests
>        </Proxy>

>ProxyPreserveHost Off
>ProxyStatus On

>==================
>We have this config on WEB1 as WEB2 both.  3 machines involved. 1 Apache only for load balancing and 2 machines as WEB1 and WEB2 having Apache and tomcat on each.

>We are using mod_proxy_ajp

>Tomcat is clustered. Session replication works, if single Apache is handling 2 tomcat instances. When we start second Apache, tomcat session replication stops. We want to have failover for PHP side too.

>Thank you,

>Regards,
>Kashif Rahman.

>From:Igor Cicimov [mailto:icicimov [at] gmail]
>Sent: Monday, March 12, 2012 2:12 PM
>To: users [at] httpd
>Subject: RE: [users [at] http] Apache + Tomcat Load Balancing

>You can at least tell us what OS are these servers running on? Also you said when you put second apache something is not working so we would like to see your apache config if you dont mind. Another thing not clear to me is tomcat session replication. Are the tomcats clustered? If not how do they replicate the sessions between each other?
>In meantime check mod_proxy_balancer documentation as possible solution. You can find lots of examples with sticky sessions configuration fot this module for tomcat backends.
>On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
>Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat Communication and session persistence. Can it be done using our requirement?

>Thank you,

>Regards,
>Kashif Rahman.

>From:Anam Ali Khan [mailto:anamalikhan [at] yahoo]
>Sent: Friday, March 09, 2012 7:44 PM
>To: users [at] httpd
>Cc: Kashif Rahman
>Subject: Re: [users [at] http] Apache + Tomcat Load Balancing

>Hi,

>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_jk as a connector (module) for Apache/Tomcat communication and session persistence.
>4. HAproxy also perform health checking for two servers.

>-Anam

>
>________________________________
>
>From:Kashif Rahman <kashif.rahman [at] vopium>
>To: users [at] httpd
>Sent: Friday, 9 March 2012, 11:36
>Subject: [users [at] http] Apache + Tomcat Load Balancing

>Hi,

>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



kashif.rahman at vopium

Mar 16, 2012, 1:36 AM

Post #19 of 20 (1518 views)
Permalink
RE: Apache + Tomcat Load Balancing [In reply to]

Actually we are load balancing tomcat too.



Thank you,



Best Regards,


Kashif Rahman

Principal SCM Engineer

Description: vopium_signature_logo



Vopium A/S | Office# 2, 7th Floor, Shaheen Complex | 38 Abbot Road

Lahore | Pakistan | t + 92 42 6316491 | f + 92 42 6316492



Description: imagesCAV9FMB1 + 92 334 9771227 | Description: imagesCAXWPPLS
kashif_r | w www.vopium.com <http://www.vopium.com/>



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Thursday, March 15, 2012 10:16 PM
To: users [at] httpd
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Why are you defining mod_proxy_balancer directives in WEB1 & WEB2. You only
need to configure these in Apache Load Balancer machine.



Correct me if i am wrong.



-Anam



_____

From: Anam Ali Khan <anamalikhan [at] yahoo>
To: "users [at] httpd" <users [at] httpd>
Sent: Thursday, 15 March 2012, 22:13
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Do not use session replication/sharing, use session stickiness instead.



-Anam



_____

From: Igor Cicimov <icicimov [at] gmail>
To: users [at] httpd
Sent: Wednesday, 14 March 2012, 14:48
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



What is in apache log file, any proxy errors? I would do some extra logging
if i was you as given in the below link:

http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_trou
bleshooting

On Mar 14, 2012 8:28 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Yes I have that same in server.xml on both tomcats.



Thank you,



Best Regards,

Kashif Rahman



From: Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Wednesday, March 14, 2012 2:21 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



Does the route parameters in the apache balancer tomcat1 and tomcat2 match
the jvmRoute value in the tomcat connectors?

On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Here what I have used :



==================



ProxyRequests Off

<Proxy *>

AddDefaultCharset Off

Order deny,allow

Allow from all

</Proxy>

ProxyPass /balancer-manager !

ProxyPass /examples balancer://qawebcluster/examples

ProxyPassReverse /examples balancer://qawebcluster/examples

ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin

ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin



#ProxyPass /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

#ProxyPassReverse /kashif balancer://qawebcluster/kashif
stickysession=JSESSIONID|jsessionid

ProxyPass /kashif balancer://qawebcluster/kashif

ProxyPassReverse /kashif balancer://qawebcluster/kashif

ProxyPass /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

ProxyPassReverse /k balancer://qawebcluster/k
stickysession=JSESSIONID|jsessionid

<Proxy balancer://qawebcluster>

BalancerMember ajp://127.0.0.1:8009 route=tomcat1 disablereuse=On

BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On

ProxySet lbmethod=byrequests

</Proxy>



ProxyPreserveHost Off

ProxyStatus On



==================

We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
tomcat on each.



We are using mod_proxy_ajp



Tomcat is clustered. Session replication works, if single Apache is handling
2 tomcat instances. When we start second Apache, tomcat session replication
stops. We want to have failover for PHP side too.



Thank you,



Regards,

Kashif Rahman.



From: Igor Cicimov [mailto:icicimov [at] gmail]
Sent: Monday, March 12, 2012 2:12 PM
To: users [at] httpd
Subject: RE: [users [at] http] Apache + Tomcat Load Balancing



You can at least tell us what OS are these servers running on? Also you said
when you put second apache something is not working so we would like to see
your apache config if you dont mind. Another thing not clear to me is tomcat
session replication. Are the tomcats clustered? If not how do they replicate
the sessions between each other?
In meantime check mod_proxy_balancer documentation as possible solution. You
can find lots of examples with sticky sessions configuration fot this module
for tomcat backends.

On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:

Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
Communication and session persistence. Can it be done using our requirement?



Thank you,



Regards,

Kashif Rahman.



From: Anam Ali Khan [mailto:anamalikhan [at] yahoo]
Sent: Friday, March 09, 2012 7:44 PM
To: users [at] httpd
Cc: Kashif Rahman
Subject: Re: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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_jk as a connector (module) for Apache/Tomcat
communication and session persistence.

4. HAproxy also perform health checking for two servers.



-Anam



_____

From: Kashif Rahman <kashif.rahman [at] vopium>
To: users [at] httpd
Sent: Friday, 9 March 2012, 11:36
Subject: [users [at] http] Apache + Tomcat Load Balancing



Hi,



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
Attachments: image001.png (6.74 KB)
  image002.jpg (0.79 KB)
  image003.jpg (0.90 KB)


icicimov at gmail

Mar 16, 2012, 8:37 PM

Post #20 of 20 (1511 views)
Permalink
Re: Apache + Tomcat Load Balancing [In reply to]

Ok lets summarize, you have one apache load balancing the two backend
apaches which are load balancing the two backend tomcat servers. I
personally can't see any fault in this line up or your apache proxy
configuration and no reason really why would tomcat cluster session
replication stop working . Maybe has to do something with the first apache?
How is that one configured? Although the worker/tomcat name will always be
in the client cookie and doesn't really matter which one of the two apaches
will handle the request. Assuming they both have identical proxy balancer
configuration...have you checked that?

Also did you enabled the extra logging as per the link I sent? That should
help you in the troubleshooting, without knowing what exactly is in the
requests you can't do much can you? Also didn't answer if there are any
errors in the apache logs?


On Fri, Mar 16, 2012 at 7:36 PM, Kashif Rahman <kashif.rahman [at] vopium>wrote:

> Actually we are load balancing tomcat too.****
>
> ** **
>
> Thank you,****
>
> ** **
>
> Best Regards,****
>
> *
> Kashif Rahman*
>
> Principal SCM Engineer****
>
> [image: Description: vopium_signature_logo]****
>
> ** **
>
> Vopium A/S | Office# 2, 7th Floor, Shaheen Complex | 38 Abbot Road****
>
> Lahore | Pakistan |* **t* + 92 42 6316491 |* **f* + 92 42 6316492****
>
> * *
>
> [image: Description: imagesCAV9FMB1] + 92 334 9771227 | [image:
> Description: imagesCAXWPPLS] kashif_r | *w* www.vopium.com****
>
> ** **
>
> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
> *Sent:* Thursday, March 15, 2012 10:16 PM
> *To:* users [at] httpd
>
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> Why are you defining mod_proxy_balancer directives in WEB1 & WEB2. You
> only need to configure these in Apache Load Balancer machine.****
>
> ** **
>
> Correct me if i am wrong.****
>
> ** **
>
> -Anam****
>
> ** **
> ------------------------------
>
> *From:* Anam Ali Khan <anamalikhan [at] yahoo>
> *To:* "users [at] httpd" <users [at] httpd>
> *Sent:* Thursday, 15 March 2012, 22:13
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> Do not use session replication/sharing, use session stickiness instead.***
> *
>
> ** **
>
> -Anam****
>
> ** **
> ------------------------------
>
> *From:* Igor Cicimov <icicimov [at] gmail>
> *To:* users [at] httpd
> *Sent:* Wednesday, 14 March 2012, 14:48
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ** **
>
> What is in apache log file, any proxy errors? I would do some extra
> logging if i was you as given in the below link:****
>
>
> http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_troubleshooting
> ****
>
> On Mar 14, 2012 8:28 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Yes I have that same in server.xml on both tomcats.****
>
> ****
>
> Thank you,****
>
> ****
>
> Best Regards,****
>
> Kashif Rahman****
>
> ****
>
> *From:* Igor Cicimov [mailto:icicimov [at] gmail]
> *Sent:* Wednesday, March 14, 2012 2:21 PM
> *To:* users [at] httpd
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Does the route parameters in the apache balancer tomcat1 and tomcat2 match
> the jvmRoute value in the tomcat connectors?****
>
> On Mar 12, 2012 9:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Here what I have used :****
>
> ****
>
> ==================****
>
> ****
>
> ProxyRequests Off****
>
> <Proxy *>****
>
> AddDefaultCharset Off****
>
> Order deny,allow****
>
> Allow from all****
>
> </Proxy>****
>
> ProxyPass /balancer-manager !****
>
> ProxyPass /examples balancer://qawebcluster/examples****
>
> ProxyPassReverse /examples balancer://qawebcluster/examples****
>
> ProxyPass /kashif/admin ajp://x.x.x.x:18009/kashif/admin****
>
> ProxyPassReverse /kashif/admin ajp://x.x.x.x:18009/kashif/admin***
> *
>
> ****
>
> #ProxyPass /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> #ProxyPassReverse /kashif balancer://qawebcluster/kashif
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPass /kashif balancer://qawebcluster/kashif****
>
> ProxyPassReverse /kashif balancer://qawebcluster/kashif****
>
> ProxyPass /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> ProxyPassReverse /k balancer://qawebcluster/k
> stickysession=JSESSIONID|jsessionid****
>
> <Proxy balancer://qawebcluster>****
>
> BalancerMember ajp://127.0.0.1:8009 route=tomcat1
> disablereuse=On****
>
> BalancerMember ajp://x.x.x.x:8009 route=tomcat2 disablereuse=On*
> ***
>
> ProxySet lbmethod=byrequests****
>
> </Proxy>****
>
> ****
>
> ProxyPreserveHost Off****
>
> ProxyStatus On****
>
> ****
>
> ==================****
>
> We have this config on WEB1 as WEB2 both. 3 machines involved. 1 Apache
> only for load balancing and 2 machines as WEB1 and WEB2 having Apache and
> tomcat on each.****
>
> ****
>
> We are using mod_proxy_ajp****
>
> ****
>
> Tomcat is clustered. Session replication works, if single Apache is
> handling 2 tomcat instances. When we start second Apache, tomcat session
> replication stops. We want to have failover for PHP side too. ****
>
> ****
>
> Thank you,****
>
> ****
>
> Regards,****
>
> Kashif Rahman.****
>
> ****
>
> *From:* Igor Cicimov [mailto:icicimov [at] gmail]
> *Sent:* Monday, March 12, 2012 2:12 PM
> *To:* users [at] httpd
> *Subject:* RE: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> You can at least tell us what OS are these servers running on? Also you
> said when you put second apache something is not working so we would like
> to see your apache config if you dont mind. Another thing not clear to me
> is tomcat session replication. Are the tomcats clustered? If not how do
> they replicate the sessions between each other?
> In meantime check mod_proxy_balancer documentation as possible solution.
> You can find lots of examples with sticky sessions configuration fot this
> module for tomcat backends.****
>
> On Mar 12, 2012 6:19 PM, "Kashif Rahman" <kashif.rahman [at] vopium> wrote:
> ****
>
> Thanks Anam, but we are looking at to use mod proxy for Apache/Tomcat
> Communication and session persistence. Can it be done using our requirement?
> ****
>
> ****
>
> Thank you,****
>
> ****
>
> Regards,****
>
> Kashif Rahman.****
>
> ****
>
> *From:* Anam Ali Khan [mailto:anamalikhan [at] yahoo]
> *Sent:* Friday, March 09, 2012 7:44 PM
> *To:* users [at] httpd
> *Cc:* Kashif Rahman
> *Subject:* Re: [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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_jk* as a connector (module) for
> Apache/Tomcat communication and session persistence.****
>
> 4. HAproxy also perform health checking for two servers.****
>
> ****
>
> -Anam****
>
> ****
> ------------------------------
>
> *From:* Kashif Rahman <kashif.rahman [at] vopium>
> *To:* users [at] httpd
> *Sent:* Friday, 9 March 2012, 11:36
> *Subject:* [users [at] http] Apache + Tomcat Load Balancing****
>
> ****
>
> Hi,****
>
> ****
>
> 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 2
> nd 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****
>
> ****
>
> ** **
>
> ** **
>
Attachments: image002.jpg (0.79 KB)
  image001.png (6.74 KB)
  image003.jpg (0.90 KB)

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.