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!

preguntada hace un año420 visualizaciones
1 Respuesta
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
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas