"Graham Bleach" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi list,
>
> From my reading of the mod_jk source I have come to the conclusion that
> mod_jk maintains a runtime list of load balanced workers in each apache
> child process. Is this correct? (Sorry, I'm not very C literate).
>

Yup, that's correct, and (at least in the case of pre-fork) can cause the
skewed distribution you are seeing.

> The relevance for my deployment situation:
>
> Our production environment consists of 2 apache servers running apache
> 1.3.29 and mod_jk and 6 tomcat servers running tomcat 4.1.29. All
> servers are Sun Blades running Solaris 8.
>
> Apache is set to have:
>
> MaxServers 100
> MaxClients 10
> KeepAlive off
>
> Each apache uses a load-balanced worker, which uses a worker list of all 6
> tomcat instances. There is a mix of dynamic (served by tomcat) and
> static content (served by apache). MaxClients, is in fact a standard
> apache setting, which we use on the other sites we host and was adopted
> for consistency.
>
> We observe in production that the load balancing is heavily skewed;
> the first worker in the list attracts the most AJP connections (verified
> with netstat and a grep for ESTABLISHED connections). My theory so
> far is that because each apache process maintains its own worker list
> and we have MaxClients set to 10, the apache processes serve relatively
> few requests which create AJP connections before dying.
>
> My plan is to:
>
> - determine the ratio of static/dynamic requests
> - set MaxClients so that on average the number of dynamic requests
>   received is a multiple of 6 (the number of tomcat servers)
>
> I believe this will go some way towards making the load balancing more
> even. What does the list think?
>
> On a related matter, if the worker list is stored in process memory, I
> wonder if there is any merit having sticky sessions enabled? With our
> current setting (having KeepAlive off) they would only be able to re-use
> the AJP connection if they are (by chance) re-allocated to the same
> apache process.
>

Well, firstly everyone gets to re-use the AJP connection.  Secondly, if
session-tracking is on and configured correctly, then the client will get
routed to the same Tomcat instance regardless of which Apache child gets the
next request.

> Apologies if this has been answered before, but I've been subscribed for
> some weeks now and I've not noticed it or found anything in the FAQ.
>
> Note: We are required to use Apache 1.3 as we use several bespoke
> apache modules which have not been ported to Apache 2. From various
> remarks made on this list I have gained an impression that mod_jk2 is
> not designed to work with Apache 1.3, so have not so far tested with
> jk2. I added this note just in case someone thinks about telling me to
> use Apache 2 / jk2 instead :-)
>

I don't use mod_jk2 myself, but it should work fine with Apache 1.3.
However, it has the same problem with load-balancing under pre-fork, so this
issue isn't enough of a reason to move to it.

> G
> -- 
> Computer Science is no more about computers than astronomy is about
telescopes.
>         -- E. W. Dijkstra




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to