Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful shutdown on ASG scale-in #20

Open
gerhalt opened this issue May 15, 2020 · 0 comments
Open

Graceful shutdown on ASG scale-in #20

gerhalt opened this issue May 15, 2020 · 0 comments

Comments

@gerhalt
Copy link
Owner

gerhalt commented May 15, 2020

Spot instance termination is very frequently checked via a cron job running on the host, and if a termination notice is seen, the server is gracefully stopped and a backup produced to S3 (see utilities/shutdown.sh).

This doesn't happen if the ASG is scaled in. Instead, we could register a lifecycle hook with a consumer listening to an SQS topic. Because our ASGs only operate with a singleton, having a topic per ASG and a consumer on the box, ready to call the shutdown script, seems reasonable.

This feature sets the stage for setting up things like user-count-based health checks, where the ASG could autoscale down to 0 if no players have been present for a certain amount of time.

@gerhalt gerhalt changed the title Graceful shutdown on ASC scale-in Graceful shutdown on ASG scale-in May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant