Folks;
apologies if this is a very basic question: We use docker containers to provide HTTP services which are fronted by haproxy. Right now, we know there are four “instances” living behind ports known to haproxy, and in course of deployment, we replace one by one of these containers.
This works, but it also always causes a bit of pain for various reasons. So, I am looking for a setup such as this:
- I want to provide haproxy with a range of ports where backend servers could be listening, given we will never have all of these services actually running.
- I’m looking for some (straightforward, ideally shell-scriptable) way to send one or multiple backend servers into a mode where they don’t accept new connections so I can bring them down as soon as the last active session on them has been terminated. Editing haproxy config file or restarting haproxy shouldn’t be involved here.
- Our monitoring environment should have a way to cause an alert if less than backend processes are available to the haproxy.
How do you handle such setups? Any best practises or reading recommendations?
TIA and all the best,
Kristian