Scaling ECS, EKS and serverless workloads: DOP-C02 study notes and practice questions
What to know about Scaling ECS, EKS and serverless workloads for the DOP-C02 exam, from the Resilient Cloud Solutions domain (15% of the exam guide), then 1 free question to test it. Part of the DOP-C02 study guide.
These questions ask how to scale tasks, pods or functions to match real demand.
Amazon ECS
Service auto scaling through Application Auto Scaling: target tracking on CPU, memory or ALB requests per target, step scaling and scheduled scaling.
For queue workers, scale on backlog per task (messages in queue ÷ running tasks), a custom metric, with a target the team can process in the allowed latency.
Capacity providers link services to Auto Scaling groups (with managed scaling and managed termination protection) or Fargate and Fargate Spot.
Fargate removes server management.
Amazon EKS
Tool
Scales
Horizontal Pod Autoscaler
Pods by CPU, memory or custom metrics
KEDA
Pods by event sources, such as queue length
Karpenter
Nodes, choosing right-sized instances quickly, including Spot
Cluster Autoscaler
Nodes in managed node groups
EKS Auto Mode
AWS manages nodes and scaling
Fargate profiles
Pods without nodes
Lambda
Scales automatically per request up to the account’s concurrency quota.
Reserved concurrency caps a function (protecting databases) and guarantees capacity.
Provisioned concurrency keeps environments initialized for steady low latency, and can be scaled with Application Auto Scaling.
SQS event source scales pollers with queue depth; maximum concurrency on the event source limits it.
RDS Proxy pools database connections from many functions.
Common traps
CPU scaling for queue workers whose CPU stays low while the backlog grows.
Scheduled scaling alone for unpredictable queues.
Unlimited Lambda concurrency overwhelming a database. Use reserved concurrency or RDS Proxy.
Scaling nodes by CPU on EKS when pods are pending; Karpenter reacts to unschedulable pods directly.
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.
AA. 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.
BB. 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.
CC. 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.
DD. 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.
B. Wrong: A schedule ignores the actual backlog, so a morning spike can still wait for capacity. It also keeps capacity high when the queue is empty, which the team wants to avoid.
C. Right: Correct. Backlog per task is the measure the team asked for, and target tracking scales the service out and in to keep it near the target. Metric math builds the value from existing queue and service metrics, so no scaling service or publishing code is needed. Learn more: Scaling policy based on Amazon SQS (opens in a new tab)
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.
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 →