Thanks for the hints, Ben. I'll defer to those who are experts about whether or 
not something like that should be part of the core functionality; however, it 
seems that even though this case might not be a great one for adding that to 
the core, there are a multitude of reasons why you'd want some sort of trigger 
mechanism on events within HAProxy. I think people have asked here before about 
e-mail notifications for downed hosts, and I can think of a few other cases 
outside of mine corner case that would seem to warrant some generic trigger 
mechanism within HAProxy. Seems if a generic one is implemented the flexibility 
is there for everyone who needs a trigger of some sort or another to use it for 
whatever purposes suite their needs. 

I'm not a very good programmer (barely can be called a programmer at all), so I 
don't have code to contribute to make that a reality, and I don't want to start 
any sort of war over where that belongs, just my view as a HAProxy user. 

Thanks! 
-Nick 



From: "Ben Timby" <bti...@gmail.com> 
To: "Nick E Couchman" <nick.couch...@seakr.com> 
Cc: haproxy@formilux.org 
Sent: Monday, May 11, 2015 11:24:58 AM 
Subject: Re: VM Power Control/Elasticity 

Nick, 

HAProxy provides statistics via socket or HTTP interface. You can easily 
monitor these stats and run scripts. Some cron jobs and regex should suffice. 
Specific cases like this are usually not something I would imagine belongs in 
HAProxy core, since it is not directly related to load balancing but more of a 
specific requirement. 

You could simply configure all 10 servers, 5 of which would mostly be in the 
down state until your script brought them UP. HAProxy will happily balance 
traffic to all UP servers, and shift it away from DOWN servers. 

You can also use the stats socket to mark machines as up or down, so that 
traffic can be gracefully shifted before after VM power up/down. However, this 
may or may not be necessary depending on the services you are load balancing. 

https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2 


Reply via email to