On Sun, Jan 25, 2009 at 07:06:23PM -0500, John Marrett wrote:
> Willy, 
> 
> > No problem, no time wasted yet !
> 
> Well, none of your time :) It took me far longer than it should have to
> realise my error. Regretable, packet captures are usually my first
> diagnostic tool. A mistake I won't make again any time soon.
> 
> > Have you at least found a solution to your issue ?
> 
> I've found a partial solution to my issue, and in fact, now I have a
> question that's relevant to the list. The backend server is IIS, if
> you're getting 503s during shutdowns, you can use this solution to turn
> them into RSTs [1]. 
> 
> The RST is sent by IIS after it receives the full client request from
> HAProxy (I suspect that it may want to see the Host header before it
> decides how it wants to treat the request). When HAProxy receives the
> RST it returns a 503 to the client (respecting the errorfile!). Despite
> the presence of "option redistribute", HAProxy does not send the request
> to another backend server.
> 
> If there was a way to get HAProxy to send the request to another
> functional real server at this time it would be great, though I fear
> that HAProxy no longer has the request information after having sent it
> to the server.

You're perfectly right, redispatch only happens when the request is still
in haproxy. Once it has been sent, it is cannot be performed. It must not
be performed either for non idempotent requests, because there is no way
to know whether some processing has begun on the server before it died
and returned an RST.

> Any further advice would be much appreciated, I can provide packet
> captures off list if required.

Shouldn't you include the Host header in the health checks, in order to
sollicit the final server and get a chance to see it fail ?

Regards,
Willy


Reply via email to