DOP-C02 Question 163
Select 2A media company is using an Amazon ECS cluster to run a containerized video transcoding application. The application processes large volumes of video files and experiences significant traffic spikes during major events. The company has noticed delays in processing during these spikes, which impacts customer satisfaction. As a DevOps Engineer, you need to implement a scalable solution that meets the business requirements of handling traffic spikes efficiently while minimizing costs. What should you do?
- A
Configure an AWS Application Auto Scaling policy for the ECS service to scale out based on the number of messages in an SQS queue.
- B
Switch the ECS cluster to run on EC2 instances instead of Fargate for better performance tuning.
- C
Use AWS Lambda to offload some of the video processing tasks to reduce the load on the ECS cluster.
- D
Optimize the ECS task definitions to reduce the CPU and memory requirements for the containers.
- E
Configure an ECS service with a target tracking scaling policy based on CPU utilization.
Show answer and explanation
Correct answers: A, E
Explanation
To implement a scalable solution for the ECS-based application, you can use AWS Application Auto Scaling for dynamic scaling based on an SQS queue. This ensures the service scales with workload demands. Additionally, using a target tracking scaling policy for CPU utilization ensures the ECS service can automatically adjust its capacity to handle varying traffic patterns efficiently. These approaches align with the business requirements of addressing traffic spikes while minimizing costs.
- A. Correct.
Correct: Configuring an AWS Application Auto Scaling policy for the ECS service to scale out based on the number of messages in an SQS queue allows the application to process workloads dynamically based on demand. This is a scalable solution to handle traffic spikes efficiently.
- B. Incorrect.
Incorrect: Switching to EC2 instances may provide more control but does not inherently solve the scalability issue. Fargate already provides scalable and serverless container orchestration, which is better suited for handling spikes without provisioning infrastructure.
- C. Incorrect.
Incorrect: While AWS Lambda can handle some workloads, offloading video processing tasks to Lambda may not be cost-effective or practical for long-running, resource-intensive tasks such as video transcoding.
- D. Incorrect.
Incorrect: Optimizing ECS task definitions may improve resource utilization but does not directly address the issue of scalability to handle traffic spikes.
- E. Correct.
Correct: Configuring an ECS service with a target tracking scaling policy based on CPU utilization allows the application to scale out when CPU usage increases, ensuring sufficient resources during traffic spikes.