Re: Cookie Timeouts

From: Dan Zubey <>
Date: Tue, 15 Jan 2008 16:27:24 -0700

Hi Willy.

Willy Tarreau wrote:
> Hi Dan,
> On Fri, Jan 11, 2008 at 10:26:30AM -0700, Dan Zubey wrote:

>> Is there a way in HAProxy to force a server cookie to time out after a
>> certain period, and force the client to request a new cookie?

> No, those are session cookies, not persistent cookies.
>> We are having issues where customer's browsers seem to be remembering
>> the server cookie value, and completely inhibiting the load-balancing
>> method.

> I don't get it. That's precisely the purpose of server cookies, they are
> used to provide persistence, which means that the same user will remain
> on the same server as long as it does not close its browser. What are
> you trying to achieve precisely ?

Well, the problem is each one of our sessions may vary in length depending on how long each student spends doing his homework.

With WRR balancing, each application instance receives exactly the same number of users as the load increases. However, since the students log off at different times, we end up with non-balanced servers near noontime. The decreasing load, in our case, is not even.

My idea was to tell an idle client that his cookie was no longer valid after a timeout, and force him to re-log in. That will take care of a case where open browsers stay permanently glued to one app.

(The best bet is to get people to close browsers when they're finished, but that's like pulling teeth with some teachers.)

This is also why I was bothering you (I do apologize, btw) about least-connection-first balancing.

Thanks again for your help,

-Dan Received on 2008/01/16 00:27

This archive was generated by hypermail 2.2.0 : 2008/01/16 00:30 CET