[Bese-devel] UCW behind a load balancer?

Marco Baringer mb at bese.it
Thu Oct 27 08:46:01 UTC 2005


Peter Scott <sketerpot at gmail.com> writes:

> Can UCW be run on several machines behind a load balancer? What needs
> to be done to do this practically?

there are two different kinds of load balancing you could do:

1) multiple machines but sessions don't move (so losing a machine
   means losing sessions). this is doable now by putting pound in
   front of the ucw farm and having it load balance on cookies (so you
   must use the cookie-session-application).

2) multiple machines with sessions in a memcache (or other distributed
   db). this is slightly less trivial. it requires serializing
   sessions, changing ucw's standard-session to send updates to
   memcache and changing standard-application to get sessions from
   memcache and not the application's session-table.

   so you'd basically define two new clasess, load-balancing-session
   and load-balancing-application. and you'd define methods on these
   generic functions:

   (find-session application)
   (make-new-session application)
   (remove-expired-sessions application)
   (delete-session application)
   (expire-session session)
   [andd maybe a couple of other thins]

   the only extra thing you'll need to worry about is what to do if
   two requests, within the same session, arrive simutaneously to two
   different machines. this requires some thought (ha! ha! ha!)

> I believe there was some work being done on serializable
> continuations, but I haven't checked on it recently. How is that
> coming along?

i had an immediate need for them, but then we (the client and I)
decided to solve it differently (the client thought their needs were
greater than they turned out to be and the hosting costs were much
higher than we initially thought), i've basically put it on
hold. however you can pass a ucw session to cl-store:store (after
making a small change to the walker) and write it out to disk. when
loading it back in you need a very minimal amout of glue to put the
session back into the app. if you need it though i'd be more than
happy to provide whatever support it takes.

p.s. - sorry this took so long to answer.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list