tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: load balancing with controlled failover
Date Wed, 01 Nov 2006 16:14:14 GMT
This is expected to be added to the proxy
module, but in a way which is more inline with
expectations for a specific proxy server (whether
serving ajp or http or anything else).

On Nov 1, 2006, at 5:39 AM, Rainer Jung wrote:

> Hi Gary,
>
> from my understanding of the code mod_proxy(_balancer) at the  
> moment is
> not able to do that. There are status settings "disable" and "stopped"
> one can set, but at the moment disbled and stopped behave the same. I
> didn't really try, but I derive that from looking at the code. This
> holds true for version 2.2.3, the head of branch 2.2 and trunk as  
> well.
>
> I remember some mail on httpd-dev, that this is known and will be  
> corrected.
>
> The module mod_jk also has the concept of disable and stop. For mod_jk
> disable means, that requests with sessions on a disabled target still
> get routed there, but requests without a session do not get routed  
> to a
> disabled target. So if your sessions are relatively short, you can
> considerably decrease the number of remaining sessions on a target by
> disabling it some time before your maintenance.
>
> I'm sure, this behaviour will come to mod_proxy too, but it looks like
> it's not there yet. Anybody: please correct me if I'm wrong.
>
> If you are going to use mod_jk, please get the latest release 1.2.19.
> It's important to know, that mod_jk can only handle ajp backends.
>
> Regards
>
> Gary Feltham schrieb:
>> Hi,
>>
>> I have a load balancing setup using Apache 2.2.2 (Win32) and 2
>> instances of Tomcat 5.5.15 and 5.5.17. So far I have been able to
>> establish a successful load balancing using sticky sessions with the
>> following config:
>>
>> ProxyPass /test balancer://testcluster stickysession=JSESSIONID
>> nofailover=On
>>
>> <Proxy balancer://testcluster>
>> BalancerMember ajp://127.0.0.1:18009/test smax=5 route=node01
>> BalancerMember ajp://127.0.0.1:28009/test smax=5 route=node02
>> </Proxy>
>>
>> I am not wanting to setup a tomcat cluster for this deployment but
>> have 2 independant instances of tomcat running independant sessions.
>> Currently this is also setup to not failover if an instance goes  
>> down.
>> For instance node01 is shutdown, the status is:
>>
>> LoadBalancer Status for balancer://testcluster
>> StickySession   Timeout FailoverAttempts        Method
>> JSESSIONID      0       1       byrequests
>>
>> Worker URL      Route   RouteRedir      Factor  Status
>> ajp://127.0.0.1:18009/test      node01          1       Err
>> ajp://127.0.0.1:28009/test      node02          1       Ok
>>
>> All expected and a request to node 1 results in a 503 response.
>>
>> My question therefore is:
>>
>> Within the context of a scheduled down time such as redeployment of
>> the application or reboot of the server I would like to be able to
>> control closure of the load balancer. For example, node 1 is targeted
>> to be shutdown for maintenance, currently I have 10 user sessions on
>> that instance and say 9 on node 2. If new users join then the load
>> balancer will evenly distribute to each node per request. What I want
>> to control is that each NEW user should only go to node 2, then each
>> session on node 1 will expire eventually leaving 0 sessions on  
>> node 1.
>> Node 1 can then be removed cleanly for maintenance and its status set
>> as disabled.
>>
>> Is there a current method of performing this in either mod_proxy or
>> mod_jk - I don't mind which but would like to gain that control?
>>
>> Many thanks,
>>
>> Gary Feltham
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message