Hi Sébastien,

On Tue, 16 Oct 2018 at 09:45, Sébastien Kurtzemann <[email protected]> wrote:
> Our goal is to
> - have some initial "free" servers in a tcp backend (for example 5 pods)
> - when a connection start : one and only one "free" server handle it and it 
> become "busy" (we do this with maxconn=1)
> - add a new "free" servers in the backend, to keep the initial number of 
> "free" servers
>
> The problem we have with seamless reload: in some case a "busy" server would 
> received
> a new connection because after reload current session would be 0.
> And if a do a restart I will lose the "busy" server connection.

What comes to mind is to mark the backend servers that are currently
busy as "backup" in the configuration, or with a lower weight, so that
they are not used in the new process. When the old process closes, the
backup keyword can be removed from the configuration and removed from
the actual running instance with the admin socket.

But this requires external scripting/provisioning/tooling and is not
quite straightforward.


> Perhaps with usage of HAProxy runtime API instead of "seamless reload"

Yeah, preconfiguring empty servers in the configuration and using the
admin socket to provision them, or provision them through DNS would be
a better idea.

But you still will have to reload haproxy when you have to change
other configurations (but that may be acceptable if it doesn't happen
that often).



Lukas

Reply via email to