
Answer-first summary for fast verification
Answer: Use Reserved Instances for the baseline capacity and use Spot Instances to handle additional capacity.
## Explanation **Option C is the correct answer** because it provides the most cost-effective solution for handling unpredictable and intermittent traffic patterns while ensuring continuous message processing. ### Analysis of Each Option: **A. Use Spot Instances exclusively** - This is NOT cost-effective because: - Spot Instances can be interrupted when AWS needs capacity back - For a production application that requires continual processing without downtime, relying solely on Spot Instances is risky - While Spot Instances are the cheapest option, they don't guarantee availability **B. Use Reserved Instances exclusively** - This is NOT cost-effective because: - Reserved Instances require upfront payment or commitment - They are cost-effective for predictable, steady-state workloads - For unpredictable traffic patterns, you would need to purchase capacity for maximum possible load, which would be wasteful during low-traffic periods **C. Use Reserved Instances for baseline + Spot Instances for additional capacity** - This IS the most cost-effective solution because: - Reserved Instances provide cost savings for the baseline (minimum) capacity that is always needed - Spot Instances handle the unpredictable spikes at the lowest possible cost - This hybrid approach balances cost optimization with reliability - The baseline Reserved Instances ensure continuous processing capability **D. Use Reserved Instances for baseline + On-Demand Instances for additional capacity** - This is less cost-effective than option C because: - On-Demand Instances are more expensive than Spot Instances - While On-Demand provides guaranteed availability, the requirement emphasizes "MOST cost-effectively" - For intermittent traffic where Spot interruptions can be tolerated for non-baseline capacity, Spot Instances provide better cost savings ### Key Considerations: 1. **Production application** - Requires reliability and continuous processing 2. **Unpredictable, intermittent traffic** - Needs flexible scaling 3. **Cost-effectiveness** - The primary requirement is minimizing costs 4. **SQS queue processing** - Messages can be retried if processing is interrupted ### AWS Best Practices: - Use Reserved Instances for baseline workloads with predictable usage - Use Spot Instances for flexible, interruptible workloads - Combine both for optimal cost savings in mixed workload scenarios - For SQS-based applications, messages remain in the queue if processing fails, allowing for retry mechanisms This solution provides the best balance of cost optimization and reliability for the given requirements.
Ultimate access to all questions.
No comments yet.
Author: LeetQuiz Editorial Team
A company runs a production application on a fleet of Amazon EC2 instances. The application reads the data from an Amazon SQS queue and processes the messages in parallel. The message volume is unpredictable and often has intermittent traffic. This application should continually process messages without any downtime.
Which solution meets these requirements MOST cost-effectively?
A
Use Spot Instances exclusively to handle the maximum capacity required.
B
Use Reserved Instances exclusively to handle the maximum capacity required.
C
Use Reserved Instances for the baseline capacity and use Spot Instances to handle additional capacity.
D
Use Reserved Instances for the baseline capacity and use On-Demand Instances to handle additional capacity.