baseplate.py icon indicating copy to clipboard operation
baseplate.py copied to clipboard

feat: Improve shutdown Delay default

Open davinci26 opened this issue 1 year ago • 1 comments

When a baseplate server is shutting down in k8s

  • baseplate calls func (srv *Server) Shutdown(ctx context.Context) error which does the following:

  • Shutdown works by first closing all open listeners

  • k8s is attempting to remove the endpoint for the endpoints group and thus make (new) incoming traffic to the pod 0

This is a race condition because some callers are still trying to connect. We have empirically seen that the 5 second default is good enough for most services.

See also https://github.com/reddit/baseplate.go/pull/615

davinci26 avatar May 05 '23 19:05 davinci26