Join GitHub today
Graceful shutdown #1799
This PR adds support for a graceful shutdown of the server. This has 2 benefits.
First, this PR will decrease our risk of data corruption during deployments. The server will now wait for all client connections to close and will then immediately shut down. Currently the server waits 30 seconds and then quits regardless if there are any open connections. This assumes any database transactions are complete within the HTTP request/response cycle.
Second, this PR will speed up our deployments since each container won't wait 30 seconds to begin shutdown, but will start to shutdown ASAP (assuming no open connections).
For context see:
TBD: I'll add some notes on how to test thoroughly.
Code Review Verification Steps
@@ Coverage Diff @@ ## master #1799 +/- ## ========================================== - Coverage 49.54% 49.41% -0.14% ========================================== Files 429 427 -2 Lines 18450 18338 -112 Branches 1636 1631 -5 ========================================== - Hits 9141 9061 -80 + Misses 8507 8480 -27 + Partials 802 797 -5
chrisgilmerproj left a comment