Course menuDOP-C02

Exams / DOP-C02 / Scaling ECS, EKS and serverless workloads / Question 1

DOP-C02 practice question: Scaling ECS, EKS and serverless workloads

Resilient Cloud Solutions A free question from our original DOP-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A SaaS startup processes uploaded invoices with containerized workers that run as an Amazon ECS service on AWS Fargate. Each uploaded file produces a message in an Amazon SQS queue, and the workers take messages from that queue.

Processing time per message varies widely, so CPU use on the workers is not a reliable signal of how much work is waiting. Customers expect each invoice to be processed within about 10 minutes of upload during business hours.

The team wants the worker count to follow the amount of waiting work per running task, scale in when the queue drains, and avoid any custom scaling service to maintain.

Which approach meets these requirements?

Choose one answer.

  1. A. Create a target tracking policy on the ECS service's average CPU utilization, with a target of 60 percent, and rely on CPU to add workers when invoices arrive.
  2. B. Create a scheduled scaling action that raises the worker count at 8 a.m. and lowers it at 6 p.m., so that the service has enough capacity during business hours.
  3. C. Create a target tracking policy that uses metric math to divide the queue's visible messages by the service's running task count, targeting the backlog per task.
  4. D. Replace the workers with an AWS Lambda function that is triggered by the queue, and rely on Lambda concurrency to match the number of messages that wait.
Show the answer and explanation

Answer: C

Explanation

A target tracking policy on a backlog-per-task metric scales an ECS service in proportion to the work waiting in the queue, both up and down. CPU does not reflect waiting messages, and a schedule ignores the actual backlog. Replacing the containers with Lambda changes the processing model the team wanted to keep.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Scaling ECS, EKS and serverless workloads? The 5 full-length practice sets have 9 more Scaling ECS, EKS and serverless workloads questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets