Thanks for the info, CJ. Has this feature been considered - the ability to add/remove on-the-fly? Anyway, I think in my situation I would just list all of the hosts in the config file initially and have some of them down, then I would already know which ones to start up to bump up the connection limit.
I think the use of the socket will get me most of the way toward where I want to go - particularly since the output comes in easily-parsable CSV. Thanks, everyone! -Nick > From: "CJ Ess" <[email protected]> > To: "Nick E Couchman" <[email protected]> > Cc: "HAProxy" <[email protected]> > Sent: Tuesday, May 12, 2015 9:46:00 AM > Subject: Re: VM Power Control/Elasticity > You can't add or remove hosts to a pool without doing a reload - you can > change > the weights, mark them up and down, but not add or remove. > On Mon, May 11, 2015 at 1:00 PM, Nick Couchman < [email protected] > > wrote: >> I was wondering if it is possible or there's a recommended way to deal with >> dynamic capacity expansion for a given back-end. I searched through the >> documentation some and didn't see anything obvious, so figured I would ask >> here. >> Basically, I would like a way to trigger a script when the number of active >> connections gets within a certain range of the total available connections >> for >> the available backend servers. I would like this script to be able to do >> something like trigger a script or command that creates or powers on or off a >> virtual machine that is already added to or could be dynamically added to or >> removed from the back-end. The basic scenario is this: >> - Back-end starts with 10 configured systems or 10 connections each. >> - 5 of the 10 systems are powered on by default, with the other 5 down. >> - Users connect, and close to 40/50 available connections. >> - HAProxy detects the connection limit and triggers a script that starts up >> the >> 6th VM. >> - Once HAProxy detects that the 6th VM is running, the number of available >> connections moves to 60. >> - Users continue to connect and close to 50/60, triggering another power >> event. >> I'd also like the reverse of that to happen: >> - Users begin to disconnect and connections drop to 40/60. >> - HAProxy triggers another script to stop one of the the configured back-end >> systems that has zero connections. >> Is this possible? Or on the roadmap? Or something that, while not implemented >> directly in the HAProxy configuration could be done some other way - some >> periodic polling of HAProxy some other way? >> Thanks, >> Nick

