AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsEasy
A company is building a new microservices-based application using Amazon ECS Fargate. Each microservice needs to be highly available and capable of scaling independently based on demand. The DevOps team wants to ensure that the application can handle fluctuating traffic patterns efficiently while minimizing operational overhead. Which scaling strategy should be implemented for the ECS Fargate services?
- AManual scaling by updating the desired count of tasks in the ECS service.
- BStep scaling policy based on the number of messages in an SQS queue.
- CScheduled scaling based on anticipated peak traffic times.
- DTarget Tracking scaling policy based on CPU utilization or Request Count per Target.
Show answer & explanationAnswer & explanation
Correct answer: D. Target Tracking scaling policy based on CPU utilization or Request Count per Target.
Target Tracking scaling policies automatically adjust the desired count of tasks to maintain a specified metric (like CPU utilization or ALB Request Count per Target) at or close to a target value. This provides proactive and reactive scaling, efficiently handling fluctuating traffic with minimal operational overhead.
Why the other options are wrong
- A. Manual scaling requires constant monitoring and intervention, which does not meet the 'efficiently while minimizing operational overhead' requirement for fluctuating traffic.
- B. Step scaling policies are more reactive and complex to configure compared to Target Tracking. While useful for specific scenarios, Target Tracking is generally preferred for simple, efficient scaling based on common metrics like CPU or request count.
- C. Scheduled scaling is good for predictable traffic, but it cannot react to sudden, unforeseen spikes or dips in demand, leading to over-provisioning or under-provisioning.
ECS Fargate Target Tracking Scaling
Target Tracking scaling for Amazon ECS Fargate automatically adjusts the number of tasks in a service to keep a specific metric (e.g., CPU utilization, ALB request count) at a target value.
- Proactive and reactive scaling.
- Automatically adjusts capacity to maintain performance.
- Simplifies auto-scaling configuration.
- Ideal for fluctuating workloads.
Memory trick: Fargate scales to target, keeps costs in sight.