Hi Mattew,

You can first send us your configuration :)

Browser are supposed to send cookies over 2 different connections for
the same domain.
So maybe you could log the Host header and the Set-Cookie header as well.

Baptiste

On Tue, Apr 23, 2013 at 11:54 AM, Matthew Wild <[email protected]> wrote:
> Hi,
>
> I'm setting up a new haproxy deployment, and am having some problems
> trying to get sessions correctly sticking to backend servers.
>
> Since it's new, it's worth firstly checking that I haven't made any
> configuration mistakes, I'm currently testing with this:
> https://gist.github.com/mwild1/19560e39196f49da4ae2
>
> I've done some debugging, and this is the usual flow I see:
>
>   -- Connection 1
>   OPTIONS->OK (backend 1) ; cross-domain pre-flight request
>   POST->OK (backend 1) (cookie is set in this response)
>   POST->OK (backend 1)
>   POST-> (backend 1) ; Here backend 1 holds the connection open (long poll)
>
>   ; The client makes a new request, and the browser opens a new
> connection because connection 1 is blocked
>   -- Connection 2
>   POST->ERROR (backend 2)
>
> All the POST requests made by the browser (Chrome) have the correct
> cookie once it is set in the first POST response.
>
> One possibility - perhaps haproxy only stores the cookie value when
> the connection closes? Since connection 1 doesn't close, connection 2
> does not get associated with the correct backend. Just a theory...
>
> Any advice or suggestions? I hope it is something simple I'm missing :)
>
> Regards,
> Matthew
>

Reply via email to