Auto scaling - Capacity Rebalance kept stopping/terminating instances

0

We are seeing that recently there seems to be issue with

Capacity rebalanceInfo
When you enable capacity rebalancing, and a rebalance notification is sent to an instance, EC2 Auto Scaling automatically attempts to replace the instance before it is interrupted.

When enabled, we see that our instance kept terminating and stopping, which creates unnecessary loads of our cache/DB/other infra as every new instance requires setup/init This is NOT due to spot instance being terminated as the termination reason is always

At 2022-10-24T01:59:17Z an instance was taken out of service in response to an EC2 instance rebalance recommendation.

What we expect is when an instance is only terminated only when

  1. spot capacity termination request
  2. spot lifetime exceeded

Perhaps this is an issue with recent capacity limit issue w east?

Launching a new EC2 instance. Status Reason: Could not launch Spot Instances. InsufficientInstanceCapacity - We currently do not have sufficient capacity in the Availability Zone you requested. Our system will be working on provisioning additional capacity.
asked 2 years ago411 views
1 Answer
1

Hi There

When you enable Capacity Rebalancing for your Auto Scaling group, Amazon EC2 Auto Scaling attempts to proactively replace the Spot Instances in your group that have received a rebalance recommendation. This provides an opportunity to rebalance your workload to new Spot Instances that aren't at an elevated risk of interruption.

There are a few best practices to check if you are seeing frequent rebalancing recommendations.

One of which is that it is a best practice to use a few different instance types to allow Amazon EC2 Auto Scaling to launch another instance type in the event that there is insufficient instance capacity in your chosen Availability Zones.

Also check the allocation strategy and conside using the capacity-optimized strategy

profile pictureAWS
EXPERT
Matt-B
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions