Hi,

We are using haproxy to load balance a vendor application across three servers. This has been very successful, but recently the vendor has released a new interface which is a single page AngularJS application, and since we went live on Tuesday we have been having problems with premature session timeouts.

Sessions are managed on haproxy with a stick table which stores a JSESSIONID cookie value which is also shared with the application session management. This has a timeout set to 30 minutes both in haproxy and in the application.

The way the timeouts are happening suggests that haproxy may be assuming that there is no activity because the page is never reloaded, though of course there will be JS traffic across the connection. Could you advise whether this is likely? And if so, are there any recommendations for settings which would work better?

This is the session-related part of our configuration for reference (redacted slightly):

backend prd-http
        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

        http-request del-header Proxy
        option httplog
        option originalto
        balance roundrobin
        option httpchk GET /
        http-check expect status 200
        server server1
        server server2
        server server3 backup

backend front_jsessionid
        stick-table type string len 52 size 10m expire 30m

There is a further backend which is the server used for authentication; the session cookie is not shared with that.

Thanks,

Simon


Reply via email to