-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Really allow graceful shutdown #30
Comments
So this is two parts:
Question: do we need this for the memory transport? Probably not, right? |
I think also the memory channel is affected. You could have an RPC running while the ServerChannel is being closed. You still want that rcp channel to stay alive until it is done. Though this does pose a question wrt to how to handle an rpc which is infinitely streaming like the watch. I hadn't considered that yet. I guess you need a grace period or some other way to handle those. |
Maybe that is a stupid question, but what is the actual benefit of a graceful shutdown? I expect services to handle all sorts of non graceful scenarios such as network outages and power outages without getting into a weird state. I also want to be able to kill a process with So why not always shut down non-gracefully, if it makes things simpler? I guess that is me being influenced by the erlang "let it crash" philosophy that also made it into akka, and that I found quite appealing... https://medium.com/@vamsimokari/erlang-let-it-crash-philosophy-53486d2a6da |
For completeness (and because I'm waiting on CI... 😉 ) I'll add some reasons here from the out-of-band discussion:
The erlang let-it-crash philosophy is about how to handle errors. It's a good philosophy in the face of decent process supervision. But this doesn't have to mean the only way to shut down a server is to crash it. |
Ok, that's a pretty rubbish title. But what we really need to be able to do is:
The way the server is used in iroh-memstore would allow making use of this to nicely terminate. And I'm pretty sure the hyper and quinn transports allow us to implement this here.
This is kind of already done for the http2 transport, but because there was no use yet for the explicit waiting API it was not handled so needs extending.
The text was updated successfully, but these errors were encountered: