[Seaside] Re: Load balancing with one session per image

rkrock at locksleycreeksoftware.com rkrock at locksleycreeksoftware.com
Tue Jun 23 15:11:48 UTC 2009


The approach below is along the lines taken by a major US company who uses
VA. The other factor they ran into was what to do when the session had
'timed' out. They wanted a user to be able to continue with a session even
though it had 'time out. They needed a fail over mechanism to assign the
'timed out' session to a new server and move the transaction information
to the new server. You may not have that problem.

The solution was home grown.

> Bob Nemec wrote:
>> How can we load balance across a number of VW Seaside images where we
>> limit
>> each image to one Seaside session?  So, once a Seaside session is
>> affiliated
>> with a VW image, no other Seaside session can be serviced by that image.
>> The image is only available when the session expires or the user logs
>> out.
>
> Here is an untested idea. If a request comes in without a session key,
> then redirect the request to an assigner image that can assign a session
> key and an affiliated worker image. Then another redirect would get the
> load balancer to send the request to the right worker image.
>
> If you're using GemStone (or even a relational DB), then a list of
> available worker images could be kept. Each image would
> register/unregister it's availability, by adding/removing itself to/from
> the collection. Initially, the image's status would be session-is-free.
>
> The assigner application would chose an available worker image, which
> has image status: session-is-free. The assigner would change the status
> to: session-is-assigned. Then the redirect is done to the assigned
> worker image.
>
> When the session terminates, the worker image would update it's status
> to: session-is-free - thus returning itself to the worker image pool.
>
> Maybe you could have the assigner functionality run in every worker
> image, instead of only in a single designated image. In this case, the
> assigner code would need to test for session-is-free and set
> session-is-assigned in a single transaction.
>
> Hope this helps.
>
> --
> Yanni Chiu
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>




More information about the seaside mailing list