Skip to content

Autoscaling and cold starts

Desired replicas and ready capacity are different states.

Predict first

Before you read: predict

A catalog worker group has 10 Ready replicas, complete metrics averaging 54 units per replica, and a target of 50. Limits and rate policies do not bind; the default tolerance applies.

Under the simplified HPA model, what replica recommendation results?

Pick one

The 30-second version

Autoscaling requests capacity; readiness follows later. A simplified HPA multiplies current replicas by the metric-to-target ratio and rounds upward, unless tolerance suppresses the change. Sampling, boot and warm-up delay usable capacity. Downscale stabilization retains recent higher recommendations. Scheduled preparation or initialized reserves can cover known demand; backlog metrics can reveal waiting work that CPU misses.

Desired replicas and ready capacity are different states.

How it works

Step 1 of 7

Sample. HPA periodically reads metrics; its default sync interval is 15 seconds. Kubernetes

Analogy: Preparing ice sheets

An ice arena accepts a tournament booking before the players arrive. The manager can commission another sheet, but commissioning does not mean skaters can use it immediately. Staff must prepare and inspect the surface. If the manager only checks demand periodically, a group arriving just after inspection waits until the next inspection even before preparation starts. A ready reserve sheet can avoid some preparation work, but keeping it ready consumes resources.

Ice-rink operation Autoscaling concept
Periodic attendance check Metric sampling
Commissioned sheet Desired replica
Prepared, inspected surface Ready worker
Tournament booking Scheduled preparation
Maintained reserve sheet Initialized capacity

The mapping concerns readiness, not rink construction speed. Physical ice sheets do not resize like processes, and a reservation is not a universal guarantee of immediate service. Different services reserve different resources. AWS Lambda reserved concurrency allocates a concurrency allowance; provisioned concurrency initializes execution environments. An EC2 warm pool keeps instances beside an Auto Scaling group, potentially stopped or hibernated, so activation can still have work remaining. These distinctions matter before treating every product called a reserve as equivalent. AWS concurrency Warm pools

Try it

Answer first, then check. Nothing is saved.

Question 1 of 5

8 replicas are running. Recommendation history contains 8 at virtual second 30 and a raw recommendation of 2 at second 120. At second 120, default downscale stabilization applies; other policies do not bind.

Which recommendation survives?

Pick one

Question 2 of 5

A catalog Lambda release needs a configured baseline that can respond without allocation-time initialization delay.

Which capacity feature supplies that operating condition?

Pick one

Question 3 of 5

A worker is requested at virtual second 15. Its boot phase takes 30 virtual seconds and its subsequent warm-up takes 15. The endpoint returns 200 once ready and 503 while warming.

What status sequence appears when checked at seconds 15, 45 and 60?

Pick one

Question 4 of 5

Demand arrives just after virtual second 0. The controller samples every 15 seconds; after detection, two requested catalog workers each take 30 seconds to boot and 15 seconds to warm.

When can those workers first answer?

Pick one

Question 5 of 5

A catalog controller is configured as metric: queue-depth with target: 10 messages/replica. The observed queue depth is 31; the dashboard also shows CPU 5 against target 50, and a previous recommendation was 8.

What desired replica count does the configured metric produce?

Pick one

Go deeper

Pro tip

Keep metric identity and target units beside a scaling trace so reviewers can interpret the observation. Kubernetes metrics

Sources

Read and fetched 2026-09-30; full snapshots with URL/date/SHA256 are in this lesson's sources directory: Kubernetes HPA, KEDA 2.18 cron, KEDA 2.18 SQS, KEDA 2.18 Prometheus, AWS EC2 warm pools, AWS Lambda provisioned concurrency, AWS Lambda concurrency.

P2 passage ledger, read 2026-09-30: A uses AWS provisioned concurrency: “These execution environments are ready to respond immediately to incoming function requests.” B uses AWS concurrency, in its reserved-concurrency discussion: “However, none of these environments come pre-initialized.” C uses that page's request table: “This is the first request; no execution environment instances are available.”

Checked against the tools and docs as of 2026-09-30.