Using Both Spot and Reserved EC2 Instances | AWS Certified Cloud Practitioner Exam - CLF-C01

When to Use Spot and Reserved EC2 Instances

Question

Which of the following is a situation that would require using both Spot and Reserved EC2 Instances?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - D.

In cases that are characterised by a constantly predictable workload with brief unpredictable spikes, Amazon EC2 Reserved Instances would be the most cost-effective to meet the constantly predictable workload.

Whilst Spot Instances in an auto-scaling group would suffice to meet the demands of the build.

https://aws.amazon.com/solutions/case-studies/mercadolibre-ec2/

Option A is INCORRECT because this use case would be cost-effectively serviced by Amazon EC2 Reserved Instances with on-demand instances in an Auto Scaling group to meet the resource demands of the spike.

Option B is INCORRECT because this use case would be cost-effectively serviced by Amazon EC2 Reserved Instances alone.

Option C is INCORRECT because this use case would be cost-effectively serviced by Amazon EC2 On-demand Instances in an Auto Scaling group to meet the resource demands of the spike.

AWS EC2 instances can be purchased on-demand, reserved, or via the Spot Market. Each purchase option has its own pros and cons, and depending on the use case, a combination of these purchase options might be ideal.

The Spot Market is designed to sell unused EC2 capacity at a discounted price. These unused resources are available for a limited time, and the pricing model for Spot Instances is a bidding system. Spot Instances offer significant cost savings for workloads that are flexible in terms of availability and can be interrupted, as the instances are reclaimed if the spot price goes above the bid price.

Reserved Instances are an ideal option for workloads that have a steady-state, predictable workload. By committing to a specific EC2 instance type for a fixed term, customers can realize a significant cost savings.

In the given options, the situation that would require using both Spot and Reserved EC2 instances is option A, which has sudden unpredictable workload spikes but for a short time horizon.

Here's why:

  • The sudden unpredictable workload spikes suggest that the workload is variable and is not predictable over the long term. This makes it difficult to purchase all instances as Reserved Instances since some of the instances may be underutilized.
  • However, the workload spikes are for a short time horizon. This means that it would not be practical to purchase all the required instances via the Spot Market because it would be challenging to continually manage the Spot bidding process and allocate resources at the precise moment that they are needed.
  • Therefore, a combination of both Reserved Instances and Spot Instances would be ideal for this situation. Reserved instances could be purchased for the baseline workload, while Spot Instances could be used to handle any sudden workload spikes. This would allow the workload to scale up or down as needed, providing both flexibility and cost savings.

Option B has a predictable resource demand over a long time horizon, making it ideal for Reserved Instances but not Spot Instances. Option C has unpredictable spikes for a long time, making it challenging to use Spot Instances efficiently. Option D has a constantly predictable workload with brief unpredictable spikes, making it ideal for Reserved Instances with On-Demand instances to handle the brief unpredictable spikes.