Hi Willy,

On 11/18/2015 09:31 PM, Willy Tarreau wrote:
Hi Sylvain,

On Tue, Nov 17, 2015 at 03:09:49PM +0100, Sylvain Faivre wrote:
option http-buffer-request

maybe you should stick on the header ;-)

OK I added "option http-buffer-request", it will help for sure !

What do you mean "stick on the header" ?

Oh well, it seems like I forgot to stick on the request URL parameter,
when passed with a question mark.

What Aleks meant is that you don't need http-buffer-request as it's
only used to process POST data which isn't your case.

Oh OK. Well, I did not talk about http-buffer-request in the beginning, so I thought Aleks recommended to use it.
I can see that it is not useful in my case, so I removed it again.


So I just added this to my config :
      stick on urlp(JSESSIONID) table back_jsessionid
      stick store-request urlp(JSESSIONID) table back_jsessionid

It should cover all cases now.

These two are partially redundant, since "stick on" is already a
shortcut for "stick match" + "stick store-request". So you end up
having this :

       stick match urlp(JSESSIONID) table back_jsessionid
       stick store-request urlp(JSESSIONID) table back_jsessionid
       stick store-request urlp(JSESSIONID) table back_jsessionid

Thus you can safely remove the "stick store-request" rule, you won't
notice the difference.


OK, I did that, and also changed urlp(jsessionid) to lower case, since our application server passes it in lower case when in URL parameters.

For future reference, here is my latest config. It has been running for a few hours on our staging servers without a problem :

backend front
    [stick-table for another purpose]
    [other stuff]
    # sticky session on JSESSIONID
    stick on urlp(jsessionid) table front_jsessionid
    stick on urlp(jsessionid,;) table front_jsessionid
    stick on cookie(JSESSIONID) table front_jsessionid
    stick store-response cookie(JSESSIONID) table front_jsessionid

backend front_jsessionid
    stick-table type string len 24 size 10m expire 1h peers prod


Best regards,
Sylvain

Reply via email to