Home › Forums › AWS › AWS Certified Solutions Architect Professional › Question on spot fleet
-
The question
A company is hosting a multi-tier web application in AWS. It is composed of an Application Load Balancer and EC2 instances across three Availability Zones. During peak load, its stateless web servers operate at 95% utilization. The system is set up to use Reserved Instances to handle the steady-state load and On-Demand Instances to handle the peak load. Your manager instructed you to review the current architecture and do the necessary changes to improve the system.
Which of the following provides the most cost-effective architecture to allow the application to recover quickly in the event that an Availability Zone is unavailable during peak load?The given explanation and answer mentioned that spot fleet is a best practice
The scenario requires a cost-effective architecture to allow the application to recover quickly, hence, using an Auto Scaling group is a must to handle the peak load and improve both the availability and scalability of the application.
Setting up a diversified allocation strategy for your Spot Fleet is a best practice to increase the chances that a spot request can be fulfilled by EC2 capacity in the event of an outage in one of the Availability Zones. You can include each AZ available to you in the launch specification. And instead of using the same subnet each time, use three unique subnets (each mapping to a different AZ).
Therefore the correct answer is: Launch a Spot Fleet using a diversified allocation strategy, with Auto Scaling enabled on each AZ to handle the peak load instead of On-Demand instances. Retain the current setup for handling the steady state load. The Spot instances are the most cost-effective for handling the temporary peak loads of the application.However, it is mentioned in the documentation that spot fleet is legacy and discouraged.
- We strongly discourage using Spot Fleet because it is based on a legacy API with no planned investment.
- If you want to manage your instance lifecycle, rather use EC2 Fleet.
- If you don’t want to manage your instance lifecycle, rather use an Auto Scaling group.
-
Hello nyque,
Thanks for the feedback.
The documentation also states: “As a general best practice, we recommend launching fleets of Spot and On-Demand Instances with Amazon EC2 Auto Scaling because it provides additional features you can use to manage your fleet.”
I hope this helps!
Regards,
JR @ Tutorials Dojo-
Please correct me if I’m mistaken but from my understanding, that means using spot instances in EC2 Auto Scaling (https://aws.amazon.com/tutorials/ec2-auto-scaling-spot-instances/) and not Spot Fleet.
-
Hello nyque,
Based on the given question, the most suitable solution would be the option that says: “Launch a Spot Fleet using a diversified allocation strategy, with Auto Scaling enabled on each AZ to handle the peak load instead of On-Demand instances. Retain the current setup for handling the steady-state load.”
This option leverages the cost-effectiveness of Spot Instances for handling temporary peak loads. Setting up a diversified allocation strategy for your Spot Fleet is a best practice to increase the chances that a spot request can be fulfilled by EC2 capacity in the event of an outage in one of the Availability Zones.
Additionally, AWS can terminate Spot Instances at any time when there’s a surge in demand for On-Demand instances of the same type. For example, if there’s a surge in demand for m5.large On-Demand instances, AWS may terminate your m5.large Spot Instances, leaving you without capacity, which can affect the performance of your application.
Spot Fleet allows you to specify various EC2 instance types across different families. This helps ensure that other instance types are still available if there is a demand surge for a particular instance type.
Please refer to these:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Fleets.htmlI hope this helps!
Regards,
JR @ Tutorials Dojo
-
-
Log in to reply.