Closed hjr3 closed 7 years ago
I think we should let the user defines how to check the backends, with a good default. Ideas:
health checks activated
: yes/noDefault: http call on /
must return a 2xx status
First implementation landed in https://github.com/hjr3/alacrity/pull/62 . Moving this future enhancements to 0.2 milestone as it will cause large changes to the Pool.
The code is in a much better spot now that it is easier to enable/disable servers from a Pool. We can now proceed.
When adding a server to the pool, it should kick off a periodic health check. If the health check fails n times, then the server should not receive active connections.
Most load balancers will keep checking an inactive server and if it starts passing health checks in the future, it can be activated again. One concern I have with that behavior is that this proxy is for a dynamic environment it might not be feasible for servers to be removed from the pool. In that case, we have a servers that exist in the pool and that will never come back.
A few options:
There might be other ideas too. I am wary of having a default and letting it be user configured, but maybe that is another piece to the puzzle.