ASG Distribution Instances - Unavailable Spot Instances

0

Hello!

I'd like to configure a Auto Scaling Group to use only spot instances and if doesn't have any spot available, the ASG will run on demand instance. How can I do this? Is there some native feature to do that?

I was wondering to set the instances distribution to 100% Spot, but I think that will not work. Enter image description here

thanks for all!

질문됨 일 년 전420회 조회
1개 답변
0

Hello,

Currently its not possible to failover to OnDemand when spot capacity isn't available. Spot instances are offered at a discount because they are EC2's spare capacity, and in exchange for offering the discount, EC2 is then able to reclaim the instances when needed.

To minimize the possibility of capacity errors when using 100% spot, we recommend using as many instance types as possible. This way if capacity for one type isn't available, the ASG can failover to another type which does have capacity in the AZ. Similarly, enabling multiple AZs allows the ASG to failover to another AZ if there's 0 capacity available for any of your listed instance types. A few tips for maximizing your available instance types:

  • Use a list of attributes to match all possible instances that fit your workload
  • Enable Rebalance Notifications on the ASG. This allows AutoScaling to try and proactively launch a replacement instance and gracefully terminate the instance which received the spot notification warning of its imminent termination
  • Set the DesiredCapacityType to vCPUs or Memory to allow multiple sizes of instances from a single family without over or under scaling your group (this is similar to adding weights to instance types when defining an explicit list of overrides)
  • Add Burstable instances (T family) to your list. These are excluded by default and often have different usage patterns than other instance families, helping balance availability. Add an attribute for burstable and set it to include

Additionally, if you have a set minimum capacity on the ASG, you can consider using the On-Demand Base Capacity for those instances which will always be running, and purchasing a Savings Plan to lower the cost: https://aws.amazon.com/savingsplans/

AWS
답변함 일 년 전

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

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

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

관련 콘텐츠