styx
styx copied to clipboard
Please support graceful shutdown
Summary
When stopping a styx server which is accepting traffic, the process should shut down gracefully. In other words, the server should not accept new connections whilst allowing existing ongoing HTTP connections to drain off.
Considerations
- what happens on keep-alive connections?
- netty implementation is not really what we were expecting (https://github.com/netty/netty/pull/3706)
Acceptance criteria
- When styx receives a POST request to shut down, it must stop accepting new connections.
- After styx is no longer accepting new connections, it must wait until all existing HTTP requests have been served.
- After all HTTP requests have been served, styx should shut down.