/ Zope / Apsis / Pound Mailing List / Archive / 2007 / 2007-09 / sticky session with 3 way pound - a little gotcha

[ << ] [ >> ]

[ disabling a backend - any indication that this ... ] [ unsuscribe / Francesco Lunelli ... ]

sticky session with 3 way pound - a little gotcha
Alex Hunsley <alex.hunsley(at)blueyonder.co.uk>
2007-09-24 13:11:12 [ FULL ]
Following on from my previous messages about three-way pound (i.e. one 
'front' pound, and two back pounds, to allow config reloads while 
service can continue)....

Here's a little gotcha that almost got me.

I have decided that using a session type of 'IP' is sufficient. So I set 
session Type to IP on the front and the two back Pound instances.
Wrong! Of course, the two back pound instances end up seeing the IP of 
the front pound instance, not of the actual agent doing to the request.

So the solution is to use the handy "X-Forwarded-for" header in which 
Pound stores the originating IP.
So my 'front' pound instance uses 'IP' session type, and the two back 
pound instances have the following session definition:

    Session
        Type    Header
        ID      "X-Forwarded-for"
        TTL     1920
    End

This seems to be doing what I want now.

cheers all!
Alex

MailBoxer