Jan-Frode,

Yes it can, there is an haproxy.conf file which contains the hosts that you are proxying the traffic for. To remove a host, you would edit this file, put a # in front of the server(s) you want taken off line and then run the following command:

/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.conf -p /var/run/haproxy-private.pid -sf $(</var/run/haproxy-private.pid)

I placed my configuration files in /etc/haproxy, but they can be anywhere on the system you want to put them. This command does a hot reload of the configuration and when you go to look at your stats page, you will see the system(s) you removed from the configuration file are no longer showing up.

As one of my clients does updates quite frequent I wrote several scripts that would take 1/2 of the servers off line at a time so they can deploy the new code to those systems and then it comes back and switches it to the next set for them to receive the new code. Once all is done all servers are then put back into service.
Joe

Jan-Frode Myklebust wrote:
We're currently using apache mod_proxy_balancer and cookies
to make sessions sticky to backend hosts.  Unfortunately
mod_proxy_balancer doesn't seem to have any way of draining
backend nodes. i.e. when we need to take one node out of
service, we'd want to schedule that a few days in advanced.
Existing sessions should keep sticking to this node as long
as they're cookies hasn't expired yet, but no new sessions
should be sent to the node being taken out of service.

Can HAProxy handle that ?


  -jf




--
This message has been scanned for viruses by Colocube's AV Scanner

begin:vcard
fn:Joseph Hardeman
n:Hardeman;Joseph
org:Colocube, LLC;Operations
adr:;;4311 Communications Dr;Norcross;GA;30093;US
email;internet:[email protected]
title:Data Center Manager
tel;work:678-427-5890
tel;cell:678-427-5890
note:This email message is intended for the use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments.  Thank you.
x-mozilla-html:FALSE
url:http://www.colocube.com
version:2.1
end:vcard

Reply via email to