Re: Autoscaling in haproxy with persistence sessions

From: David Birdsong <david.birdsong#gmail.com>
Date: Mon, 7 Nov 2011 12:17:53 -0800


This sounds like what balancing on a hashed value is intended for. 'hash-type consistent' will reduce the redistribution of keys when the pool is expanded, and when nodes are removed, only the removed nodes keys are redistributed.

On Mon, Nov 7, 2011 at 11:15 AM, Erik Torlen <erik.torlen#apicasystem.com> wrote:
> 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.malik#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.torlen#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
>
>
Received on 2011/11/07 21:17

This archive was generated by hypermail 2.2.0 : 2011/11/07 21:30 CET