[Seaside] Server Identification in Session Keys

Philippe Marschall philippe.marschall at gmail.com
Wed Aug 18 05:26:12 UTC 2010


2010/8/17 Lukas Renggli <renggli at gmail.com>:
> On 17 August 2010 17:28, Sven Van Caekenberghe <sven at beta9.be> wrote:
>> Hi,
>>
>> I am trying to configure Apache 2's mod_proxy_balancer with sticky sessions towards multiple Seaside 3 instances.
>>
>> What I need, apart from starting multiple VM's with the same image running on different ports (I am working on one machine), is that each VM adds a server identification to the session key (_s), so that the balancer can route everything in the same session to the same instance.
>>
>> How can this be done ?
>
> The simplest thing is to use the port number as the identifier.
>
>> As far as I understand, it is WAApplication (WARegistry>>#handleFiltered:) that hands out session ID's in the _s parameter (#keyField), but I cannot immediately find where the session ID's are generated (is it WACache>>#store using WAKeyGenerator ?) and how I could interfere in a clean way.
>>
>> Has anyone done this before ?
>
> Sure, that's standard practice. Override #updateUrl: either in your
> custom session class or in the root component.

I don't think so. You need to change the session key to include the id
of the image. Once the request form the user agent comes, the id of
the image will still be there and you'll need to find the right
session.

Cheers
Philippe


More information about the seaside mailing list