invalidate errorfile cache to trick upstream load balancer

2014-06-25 Thread Corey Osman
Hi,

I am using a custom 200 response file so that my upstream load balancer can 
determine if my haproxy instance is operating correctly.

   errorfile 200 /home/haproxy/responses/200_resp.http

Additionally I am using the monitor-uri /healthcheck.

So when my upstream load balancer calls haproxyhost:port/healthcheck haproxy 
will return the contents of the 200_resp.http file.  

This all works fine, however if I change the contents of the 200 response file 
when haproxy is running I have noticed that haproxy is actually caching this 
file.

The caching part is fine, however in order for haproxy to see the updated 
response file I must restart/reload haproxy so it picks up the new contents.  

You might be asking why am I changing this file?  Well basically if I need to 
perform rolling restarts on my haproxy instances I need a method of signaling 
the upstream load balancer health check
to remove the haproxy instance from the available pool.  So if I change the 
contents of the 200 response I can basically automatically remove the haproxy 
instance from the pool and traffic will no longer flow to 
the haproxy instance.  However, because haproxy caches this file I need to 
restart/reload haproxy.  I would like to not have to perform this restart 
though.

Is there any way to signal haproxy to invalidate the error file cache and 
reread the errorfiles without restarting?  Can this be done through the stats 
socket?

Is anybody else doing this and have a better method?

How do I make a feature request if this functionality is not available?

thanks,

Corey Osman






backend server marked up after restart/reload on 1.4.25

2014-06-25 Thread Corey Osman
HI,

I have noticed that when I restart/reload haproxy, haproxymarks the servers in 
the backends as up without ever checking them.

So traffic is being sent to the backend server even while the backend server is 
actually down.  This occurs until the first health check fails on the server 
and haproxy marks the server as down.

I realize that changing the interval to something lower would mask this problem 
but I don’t want to flood my server with health checks. 

I would expect haproxy to treat the server as down until the health checks 
passes.  (guilty until proven innocence).  Again this is only upon 
restart/reload.

I am wondering if this is an bug in haproxy or a configuration issue on my 
part.  Is there something missing from my config?


My backend is below

backend SiteMonitor
mode http
option httpchk GET /healthcheck
http-check expect string all_good
server main-server 192.168.1.3:5000 rise 1 fall 1 maxconn 2 check inter 10s


thanks,


Corey