You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm favorable towards letting golang 1.8 own some of this.
As it currently stands truss will expose the signal handler, which is a great place to allow people to plug in x library. I think this is a good hand off of truss's ownership of the problem to the service owner.
In part because gracefully shutdown can get fairly service specific. I'm not opposed to providing a little bit out of the box, but I would like to avoid adding a dependency.
@zaquestion There currently is the issue that our server_main.go is the program that runs http.ListenAndServer and the grpc .Serve funcs. So there would be no way to add graceful restart logic as from what I can tell you would need to wrap those functions with a graceful shutdown library.
Though users do not need to use our server_main.go and perhaps if they require graceful shutdown they should create their own main package and import the generated and handler directories.
Though golang 1.8 will be released at the end of January so this issue may solve itself.
zaquestion
changed the title
Proposal: Graceful shutdown to generated services.
Proposal: Graceful shutdown of generated services.
Jan 20, 2017
Closing this as go 1.8 is coming out soon and will support this functionality out of the box. If someone wants something more fancy, they could add a lib to a generated service.
When a truss service receives a shutdown signal it will drop all http connections currently in process.
It would be nice for generated services to handle shutdown gracefully
Meaning that after shutdown signal has been received:
It looks like golang 1.8 will have this built in, we could wait for that.
Or we could use an library for this functionality. We do want to make sure the library has http2 support for grpc transport.
It looks like tylerb/graceful has http2 support. I do not see any similar thing for manners after searching their repo for "http2".
Thoughts?
The text was updated successfully, but these errors were encountered: