blaze icon indicating copy to clipboard operation
blaze copied to clipboard

Blaze servers should be able to shutdown gracefully

Open bryce-anderson opened this issue 8 years ago • 3 comments

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.

bryce-anderson avatar Jan 21 '17 03:01 bryce-anderson

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?

rossabaker avatar Jan 21 '17 04:01 rossabaker

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.

bryce-anderson avatar Jan 21 '17 04:01 bryce-anderson

I'm not sure if this is an argument for or against sealing the commands, but it's something to consider while in there.

rossabaker avatar Jan 21 '17 04:01 rossabaker