Why the drain refuses new work first
Refusing new work bounds the drain. A drain that accepts work is a drain that can be endless.
The number that must be zero
Failed requests during a stop. Zero is the claim, and the claim needs a run under load.
A server is stopped while it is serving. The stop has to be visible to the client, invisible to the client is a request that fails without saying why.
About 1 min of reading
Count failures across a stop
Write the run
Before you run it, say out loud what it will print. Then open the answer.
Find the cause
Before you run it, say out loud what it will print. Then open the answer.
Write the claim
Before you run it, say out loud what it will print. Then open the answer.
Refusing new work bounds the drain. A drain that accepts work is a drain that can be endless.
Failed requests during a stop. Zero is the claim, and the claim needs a run under load.
A connection closed without a response is retryable. A connection closed after a response is not.
Between the last request accepted and the process exiting. The window is where the ambiguity lives.
Restart under load and count the failures. The count is the whole measure of a graceful stop.