4 ms·
An alternative I like a bit more than, `remove, update, add back` is to set a signal handler to close the listening socket, wait for current requests to finish,
by hayst4ck 4y ago
An alternative I like a bit more than, `remove, update, add back` is to set a signal handler to close the listening socket, wait for current requests to finish, and then exit.
Assuming you initialize every service you depend on at program start and not in the critical path and that health checks only function after this setup work has been done it simplifies operations a bit and decreases the liklhihood of configuration errors (a drained server in a load balancer) from persisting.
- linsomniac 4y agoThat sounds clever and interesting, but in my case I'm probably dealing with ~20 services, some we build some third party, so the "remove from load balancer then update" trick works well.