Re: load balancing and inactive workers

2002-04-02 Thread Bernd Koecke

I sent a mail with a similar content to the list and discussed it on the dev 
list. The solution is to divide routing from load balancing. The following 
functionality would be easy:

 > a) sends requests with a session cookie for an inactive worker to that
 > worker
but
b) sends requests with no session cookie to a local worker

But for this you need an apache with tomcat on any node and a loadbalancer which 
knows what nodes are active. We do this with a simple protocol between 
loadbalancer and node. The 'local' worker is connected to tomcat on the same node.

Is this a possible solution for you? I'm on the way to set up a test cluster and 
than I will try to patch the lb-worker of mod_jk and send this to tomcat-dev. 
May be it is valuable for others.

Bernd

Matthew Tepel wrote:
> We are working on transitioning from Jserv to Tomcat 4.0 (believe it or
> not), and there is one problem I haven't found the answer to in the
> documentation.
> 
> We use apache with a pool of remote java servers.  There is a tool (and
> web interface) that allows us to tell mod_jserv not to send new requests
> to particular java servers.  We use this so that we can "drain" particular
> java servers and release new code on them in a way that affects only a
> small number of users.
> 
> I have not discovered a tool or web interface that would allow marking
> particular workers as "inactive" so that the load balancer:
> a) sends requests with a session cookie for an inactive worker to that
> worker
> b) sends requests no with session cookie to only active workers
> 
> I have done some web searches and seen discussions about patches relating
> to such a feature, but I haven't found documentation about whether this is
> included in Tomcat 4.0 and how to use it.
> 
> I would greatly appreciate your help in this.
> 
> -MT
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 



-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: load balancing and inactive workers

2002-04-02 Thread costinm

On Tue, 2 Apr 2002, Matthew Tepel wrote:

> This is a feature that we really need.  I would consider writing it myself
> if I knew more about how mod_jk works, what previous discussion has gone
> on in this area, how much work it involves, etc.  Any suggestions?

Any help is great. You can start by subscribing to tomcat-dev.

The biggest problem is the apache multiprocess model - we need a mechanism
to tell _all_ apache processes to stop sending requests to a worker.

There are 2 possible solutions ( that I know ): the jserv solution was to 
use a shmem segment and check it on each request. 

Another solution is to use a signal or have each process listen on 
a port (unix socket or similar ).

My sugestion is to do that in  jakarta-tomcat-connectors/jk/native2. 
( i.e. jk2 ), the code has been cleaned up, reorganised and has a much 
better configuration mechanism designed for this kind of runtime 
reconfiguration. 

I have this reconfiguration on my todo list, but I need to stabilise 
the code first and make sure everything else works.  I did some 
experiments with the pool in jserv ( i.e started to move it and 
use apr ), I'll check in when is in a decent shape.

I think you can hack jk1 too to get this to work - if you need it 
very quickly ( jk_worker_lb is the starting point, you can port the jserv 
shmem if you want - or wait for my commit ). 

Costin

> 
> On Tue, 2 Apr 2002 [EMAIL PROTECTED] wrote:
> 
> > There is no such tool for mod_jk yet.
> >
> > Next version ( Jk2 ) will have such a thing - but it's not even alpha,
> > it'll take few more months to complete it.
> >
> > Costin
> >
> >
> > On Tue, 2 Apr 2002, Matthew Tepel wrote:
> >
> > > We are working on transitioning from Jserv to Tomcat 4.0 (believe it or
> > > not), and there is one problem I haven't found the answer to in the
> > > documentation.
> > >
> > > We use apache with a pool of remote java servers.  There is a tool (and
> > > web interface) that allows us to tell mod_jserv not to send new requests
> > > to particular java servers.  We use this so that we can "drain" particular
> > > java servers and release new code on them in a way that affects only a
> > > small number of users.
> > >
> > > I have not discovered a tool or web interface that would allow marking
> > > particular workers as "inactive" so that the load balancer:
> > > a) sends requests with a session cookie for an inactive worker to that
> > > worker
> > > b) sends requests no with session cookie to only active workers
> > >
> > > I have done some web searches and seen discussions about patches relating
> > > to such a feature, but I haven't found documentation about whether this is
> > > included in Tomcat 4.0 and how to use it.
> > >
> > > I would greatly appreciate your help in this.
> > >
> > > -MT
> > >
> > >
> > > --
> > > To unsubscribe:   
> > > For additional commands: 
> > > Troubles with the list: 
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: load balancing and inactive workers

2002-04-02 Thread Matthew Tepel

This is a feature that we really need.  I would consider writing it myself
if I knew more about how mod_jk works, what previous discussion has gone
on in this area, how much work it involves, etc.  Any suggestions?

On Tue, 2 Apr 2002 [EMAIL PROTECTED] wrote:

> There is no such tool for mod_jk yet.
>
> Next version ( Jk2 ) will have such a thing - but it's not even alpha,
> it'll take few more months to complete it.
>
> Costin
>
>
> On Tue, 2 Apr 2002, Matthew Tepel wrote:
>
> > We are working on transitioning from Jserv to Tomcat 4.0 (believe it or
> > not), and there is one problem I haven't found the answer to in the
> > documentation.
> >
> > We use apache with a pool of remote java servers.  There is a tool (and
> > web interface) that allows us to tell mod_jserv not to send new requests
> > to particular java servers.  We use this so that we can "drain" particular
> > java servers and release new code on them in a way that affects only a
> > small number of users.
> >
> > I have not discovered a tool or web interface that would allow marking
> > particular workers as "inactive" so that the load balancer:
> > a) sends requests with a session cookie for an inactive worker to that
> > worker
> > b) sends requests no with session cookie to only active workers
> >
> > I have done some web searches and seen discussions about patches relating
> > to such a feature, but I haven't found documentation about whether this is
> > included in Tomcat 4.0 and how to use it.
> >
> > I would greatly appreciate your help in this.
> >
> > -MT
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: load balancing and inactive workers

2002-04-02 Thread costinm

There is no such tool for mod_jk yet. 

Next version ( Jk2 ) will have such a thing - but it's not even alpha,
it'll take few more months to complete it.

Costin


On Tue, 2 Apr 2002, Matthew Tepel wrote:

> We are working on transitioning from Jserv to Tomcat 4.0 (believe it or
> not), and there is one problem I haven't found the answer to in the
> documentation.
> 
> We use apache with a pool of remote java servers.  There is a tool (and
> web interface) that allows us to tell mod_jserv not to send new requests
> to particular java servers.  We use this so that we can "drain" particular
> java servers and release new code on them in a way that affects only a
> small number of users.
> 
> I have not discovered a tool or web interface that would allow marking
> particular workers as "inactive" so that the load balancer:
> a) sends requests with a session cookie for an inactive worker to that
> worker
> b) sends requests no with session cookie to only active workers
> 
> I have done some web searches and seen discussions about patches relating
> to such a feature, but I haven't found documentation about whether this is
> included in Tomcat 4.0 and how to use it.
> 
> I would greatly appreciate your help in this.
> 
> -MT
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: