[svlug] Apache scalability -- the cacheing problem

J C Lawrence claw at kanga.nu
Fri Aug 4 19:35:01 PDT 2000


On Fri, 4 Aug 2000 11:19:10 -0700 
Walter Reed <walt at hubinternet.com> wrote:

> In regards to the "easier state preservation" etc, wouldn't you
> have a hell of a programming problem if you ever needed to move to
> a multiple loadbalanced server environment? This is the issue for
> the company I work for where we have 13 web servers and 3 DB
> servers and need to maintain session state.

You can do this by configuring your load balancer to *tend* to
always send a given client to the same machine.  Then, for sessionID
misses you just recreate state from the backing store.  As always,
you aim to save for the common case.  The uncommon case is then no
more expensive that it was before you started saving.

> A threaded environment would do nothing for us. We use the DB to
> maintain state since web machines don't talk to each other. I
> looked at "sticky" options for load balacing (based on IP address)
> but that would lock large proxy / NAT users to a single server
> (think AOL...) This is obviosly non optimal, since you have a high
> probablity of locking several large proxy users to the same
> machine.

There's little to say that you have to assign by IP address.  For
example: If you throw the session ID the URL it becomes trivial.  If
not, you can use the referrer header to attempt to keep an idea of
locality and thus hand off intelligently.

> BTW, we use mod_perl / apache...

<nod>

-- 
J C Lawrence                                 Home: claw at kanga.nu
---------(*)                               Other: coder at kanga.nu
http://www.kanga.nu/~claw/        Keys etc: finger claw at kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--




More information about the svlug mailing list