Hey Charles.  This may be totally jank for you, but works for us in a
different scenario.  It's really just a loop to match a server name to
a backend name, and the EXCEPT flag can be toggled:

https://gist.github.com/904958

https://github.com/flores/haproxyctl

Perhaps you'll find it useful...

carlo

On Thu, Mar 24, 2011 at 1:09 PM, Willy Tarreau <[email protected]> wrote:
> Hi Charles,
>
> On Thu, Mar 24, 2011 at 05:14:09PM +0000, Charles Duffy wrote:
>> Howdy!
>>
>> I'm using HAProxy in TCP mode to redirect traffic to my database servers,
>> with a HTTP check to filter for servers appropriate to each pool -- a
>> master pool (of only one server, the identity of which may change on
>> failover events), a pool for slaves not more than 30 seconds out of date,
>> a pool for servers not more than 10 minutes out of date, etc.
>>
>> The problem I have here is that on startup or restart, all servers are
>> briefly considered eligible candidates for the master pool until the
>> layer 7 checks come back. This is not acceptable for my use case -- I
>> need to be able to flag all servers expected to be slaves as down-by-
>> default in this backend (or have all checks assumed to be "down" until
>> determined otherwise, such that traffic goes to the backup pool).
>>
>> Does HAProxy currently have an appropriate mechanism for this?
>
> Ideally we should be able to decide whether the servers start up or down
> until the check returns a verdict.
>
> Right now you can at least specify "disabled" on each server line. The
> server will not even be checked, so you'll be able to do what you want
> with it. Once you've finished, you connect to the stats socket and enter
> "enable server XXX" and the checks will start again. Alternatively, you
> can enable them from the stats interface. Obviously this requires a stats
> socket or interface in admin mode.
>
> Hoping this helps,
> Willy
>
>
>

Reply via email to