Open
Description
Motivations
- Currently the router hangs on Ctrl-C for up to a minute
- There is no cancellation token to cancel all long-running tasks gracefully
- Note: graceful exit under ECS works fine because ECS is deregistering tasks with the ALB before shutting down the containers
Overview
- Add signal handlers that signal a cancellation token when other processes have wrapped up
- Start failing health checks after receiving SIGTERM
- Wait a bit then signal the cancel token to break out of the scheduled loops like metrics, queue dispatcher, and rebalancer