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

