Interesting. In this case we are expecting a lot of burst traffic during a very 
short period of time, 15-30min so I am not sure if we can rely on scaling in a 
more proactive way to send traffic to the new servers. I would be
more comfortable if we could just clean the existing sessions and let them be 
spread over the new servers + existing servers.

I had a look at stick-table and saw that it has methods to support being 
deleted/cleared through the socket interface. Is it possible to do something 
similar to clean appsessions? Or maybe store appsession in
a stick-table and clear the session through socket command?

/E

From: Vivek Malik [mailto:vivek.ma...@gmail.com]
Sent: den 7 november 2011 11:05
To: Erik Torlen
Cc: haproxy@formilux.org
Subject: Re: Autoscaling in haproxy with persistence sessions

I personally find it easier to use cookie instead of appsession. We use a 
similar pattern of adding a new server. Keeping a low maxidle (like 10 minutes) 
helps us send traffic to new servers. Keeping maxidle helps us maintain session 
affinity where required (like progress bars for uploads)

Vivek
On Mon, Nov 7, 2011 at 1:32 PM, Erik Torlen 
<erik.tor...@apicasystem.com<mailto:erik.tor...@apicasystem.com>> wrote:
Hi,

We are currently having a system which runs haproxy in the amazon cloud. Our 
system is also using autoscaling of backendservers
so when we reach a certain cpu usage during x min we will add more servers to 
the backend and update the haproxy config + reloading haproxy.

This works good as we have it now.

What we would like is to add persistence to the backend in order to use the 
caches on the backend servers more efficiently (a shared cache would have been
better but is not the case now unfortunately).

This makes the autoscaling a bit more complex because of the persistence. When 
scaling up new servers the client would still stay on the "overloaded"
backend servers instead of start using the new ones.

So I thought I would check with you if there is a way to "clear" persistence 
session used by appsession in a good way without effecting the traffic to 
servers?

If we cleared all the persistence sessions we could let the client go into the 
new backend servers and have "request-learn" in appsession learn the
cookie and set persistence to the existing and new servers for the client.

Any ideas here?

Cheers
E

Reply via email to