On Tue, May 15, 2012 at 10:43:34PM +0200, Baptiste wrote:
> On Tue, May 15, 2012 at 8:48 PM, Foreman, Tim <[email protected]> wrote:
> > Using an 'option httpchk' service check, what happens to the existing 
> > connections to the server when it is marked down?
> >
> > We are trying to take servers out of the backend by making them fail the 
> > service check and it appears to be taking more than 120 seconds to be 
> > marked down on occasion.
> >
> > We are running v1.4.15 and this is my config:
> >
> > global
> >        log 127.0.0.1   local0
> >        log 127.0.0.1   local1 debug
> >        log-send-hostname prodlb01-dal05
> >        maxconn 4096
> >        daemon
> >
> > defaults
> >        log     global
> >        option  dontlognull
> >        retries 3
> >        option redispatch
> >        maxconn 2000
> >        contimeout      5000
> >        timeout client  60s
> >        timeout server  60s
> >        timeout check   5s
> >
> > listen  cae-preview-servers
> >        bind xx.xx.xx.xx:80
> >        default_backend caepreview_http
> >
> > backend caepreview_http
> >        mode http
> >        option  httplog
> >        stick on src table caepreview_https
> >        option httpchk GET /base/monitor/status HTTP/1.1\r\nHost:\ monitoring
> >        server  prodcaepreview01-dal05 10.41.135.140:80 check inter 5s rise 
> > 2 fall 3
> >        server  prodcaepreview02-dal05 10.41.135.141:80 check inter 5s rise 
> > 2 fall 3
> >
> > --
> > Timothy W. Foreman
> > Security Administrator/Sr. Systems Administrator
> > Internet Broadcasting
> > P: 651.365.4181 | F: 651.365.4430
> > [email protected] | AIM: timfibsys
> >
> > Visit us at: www.ibsys.com
> >
> >
> >
> 
> 
> Hi,
> 
> First of all, you're using HAProxy in tunnel mode.
> So even if the health check is failing, as long as the server does not
> shut the connection, HAProxy will maintain it opened, fowarding data
> as long as the client sends it.
> Two ways to avoid this behavior:
> 1. shut down the service to force a failover
> 2. enable the option "http-server-close"

And just because it's not well-known, on 1.5 you also have on each server
line :

      on-marked-down shutdown-sessions

Which says that any connection to the server will be shut down when the
server is marked down. This is sometimes needed on long-running sessions
for protocols such as LDAP or SQL.

Cheers,
Willy


Reply via email to