Open wrongerror opened 2 years ago
@rajibmitra , are you interested in implementing the graceful shutdown feature for functions-framework-go? https://github.com/OpenFunction/functions-framework-go :
Relevant source code: https://github.com/OpenFunction/functions-framework-go https://github.com/OpenFunction/builder/blob/main/cmd/go/of_functions_framework/template.go#L17
See also: https://github.com/gorilla/mux#graceful-shutdown : go functions framework is using gorilla now https://rafallorenz.com/go/handle-signals-to-graceful-shutdown-http-server/ https://clavinjune.dev/en/blogs/golang-http-server-graceful-shutdown/ https://www.rudderstack.com/blog/implementing-graceful-shutdown-in-go/ https://leileiluoluo.com/posts/golang-shutdown-server-gracefully.html
@zhbinary you can implement this for https://github.com/OpenFunction/functions-framework-go first
When the function rollout or scaledown, we need the function to be gracefully shutdown to avoid losing the request or event.