EmbarkStudios / server-framework

Framework for running network services, opinions included
Apache License 2.0
36 stars 4 forks source link

Listen for SIGTERM if possible #9

Closed Nehliin closed 2 years ago

Nehliin commented 2 years ago

Checklist

Description of Changes

Add listener for SIGTERM which is what k8s will send upon graceful shutdown. The default timeout for the pod to handle that is 30s after it will send SIGKILL which we can't handle. I'm not sure what more we want to do here, if the user set timeout is longer than the k8s defined timeout the connections will be forcefully dropped and imo it's not something we want to try to handle since we have to know the k8 configuration. Also I'm not sure what we would do even if we knew it except for perhaps enforcing the request timeout is no longer than what's specified in the k8 config.

Related Issues

4