DOP-C02 Question 168
Select 3You are designing an auto-scaling solution for a web application hosted on an Amazon ECS cluster behind an Application Load Balancer (ALB). The application experiences unpredictable traffic spikes and requires optimal scaling to maintain performance while minimizing costs. Which metrics would be the most appropriate to configure as scaling policies for the ECS service?
- A
Average CPU utilization of the ECS tasks
- B
Request count per target on the ALB
- C
Memory utilization of the ECS tasks
- D
Number of active connections to the ALB
- E
Disk I/O utilization of the ECS tasks
Show answer and explanation
Correct answers: A, B, C
Explanation
To scale ECS services effectively, it's important to use metrics that reflect the workload intensity and resource usage of the tasks. Average CPU utilization and memory utilization are fundamental metrics for ECS tasks because they directly measure resource demand. Request count per target on the ALB is also crucial as it represents the traffic load being distributed to the ECS tasks. These metrics allow the auto-scaling policies to respond dynamically to changes in traffic and resource usage, ensuring optimal performance and cost-efficiency. Other metrics like active connections or disk I/O may not provide an accurate representation of the ECS task workload and resource needs.
- A. Correct.
Average CPU utilization is a common and effective metric for scaling ECS services as it directly correlates with the workload intensity on the tasks. High CPU utilization indicates the need for more tasks to handle the load.
- B. Correct.
Request count per target on the ALB is an appropriate metric because it measures the load hitting the backend ECS tasks. It can help scale the service based on incoming traffic patterns.
- C. Correct.
Memory utilization is a critical metric to monitor for ECS tasks, as tasks that are memory-constrained can lead to performance degradation. Scaling based on memory utilization ensures the service can handle increasing workloads efficiently.
- D. Incorrect.
The number of active connections to the ALB is not directly tied to the resource utilization of ECS tasks and might not be the best metric for scaling ECS services, as it does not account for task performance or workload processing.
- E. Incorrect.
Disk I/O utilization is generally not a primary scaling metric for ECS services because ECS tasks typically scale based on CPU, memory, or traffic metrics rather than storage-related metrics.