Re: maintenance mode and server affinity

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 2 Aug 2011 08:52:06 +0200


Hi James,

On Mon, Aug 01, 2011 at 04:05:41PM -0400, James Bardin wrote:
> I have a number if instances using tcp mode, and a stick-table on src
> ip for affinity. When a server is in maintenance mode, clients with an
> existing affinity will still connect to the disabled server, and only
> be re-dispatched if the connection fails (and error responses from the
> backend are still successful tcp connections).

Are you sure your server was set in maintenance mode, did you not just set its weight to zero ?

There is a big difference between zero weight and maintenance mode :

So if this is not what you're observing, then it's a bug and we need to see how to reproduce it in order to fix it.

> I've done a few things to stop this traffic when needed:
> - drop the packets on the load balancer with a null route or iptables.
> - block the packets with the firewall on the backend server, and let
> the clients get re-dispatched.
> - shutdown the services that could response from the backend, and re-dispatch.
>
>
> Have I missed any configuration in haproxy that will completely stop
> traffic to a backend? I have no problem managing this as-is myself,
> but having fewer pieces involved makes delegating administration
> responsibilities easier.

I agree with you. The maintenance mode was done exactly for what you need so I want to ensure it works.

> Willy, is a "block server" option (or maybe a "drop table" to get rid
> of affinity sessions), something that could be implemented?

I think the later can be done on the stats socket using "clear table", because you can specify a rule to select which entries to clear, so you can clear any entry matching your server's ID. But it's only in 1.5, not in a stable release.

Regards,
Willy Received on 2011/08/02 08:52

This archive was generated by hypermail 2.2.0 : 2011/08/02 09:00 CEST