if I changed Ec2 type to Spot instances in autoscaling that is already deployed, does EC2 stop service while it is changing?

0

I used ECS with EC2 not fargate and also have autoscaling

as we used gpu instances, we are considering to change ec2 type as spot instance.

I have question that if i do change instance as spot, the ec2 ,which is belong to autoscaling now, could be changed to spot without stop or service stop

1개 답변
0

This depends on your setup

  • If the ASG is using a MixedInstancePolicy, and you're changing the percent from 100% OnDemand to 100% spot (or any other changes), then yes, AutoScaling will proactively rebalance. You could avoid this by enabling scale-in protection on the instances, but they won't be able to be terminated for any graceful scale-in. So you'd need to manually manage cycling them out when they're idle
  • If there's no MixedInstancePolicy, and you're just updating the launch template or launch config to use spot, then no change will immediately happen. The ASG will just use the new settings when launching new instances in the future

Make sure your application is setup in a way to handle spot. Spot capacity is best effort (by definition, its EC2s spare capacity). This means your instances might get terminated with 2 minutes of warning from spot reclaiming them, or you might have times when no spot capacity is available and you'd get launch failures. To reduce capacity issues, use as many instance types and AZs as possible.

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠