Blaze servers should be able to shutdown gracefully
Draining is a pretty nice feature to have since it allows you to avoid a bunch of errors that occur during cluster roles that happen do to abruptly dropped connections.
I envision the server to have a shutdownWithin(duration) which will signal all open sessions to close as soon as it is possible to do so safely or to forcefully break the connection within the specified duration.
For HTTP/1.x this means sending Connection: close headers on pending dispatches (if the prelude hasn't been sent) and for H2 this means sending the GOAWAY frame.
Is this going to be an HTTP-only feature or a general feature? If it's general, does it suggest the introduction of another Command to trigger state so the HTTP extensions (e.g., Connection: close) are sent?
Indeed, my first order idea I was a Command will be pushed down the pipeline since this is not a HTTP only feature. In my minds eye, the alternative is for stages to register interest in such events, but that seems significantly more complex and I don't see any clear advantages.
I'm not sure if this is an argument for or against sealing the commands, but it's something to consider while in there.