Course contentsShow
← Cloud and Infrastructure
Lesson 303 of 2,9896. Auto ScalingFree lesson

Cooldown Periods and Warmup

Configuring cooldown periods and warmup times to prevent rapid scaling oscillations and ensure stability.

Cooldown Periods and Warmup

What you'll learn: How to configure cooldown periods and warmup times to prevent your auto scaling from making wild, rapid-fire scaling decisions that could destabilize your application.

The Problem: Scaling Too Fast

Imagine you just scaled out and added three new servers. They're still booting up and haven't started handling traffic yet. Your monitoring sees high CPU on existing servers and thinks "we need MORE servers!" — so it adds three more. Then those don't help fast enough either, so it adds three more. Suddenly you have 12 servers when you only needed 6, and your costs skyrocket.

This is called scaling oscillation, and it's exactly what cooldown periods and warmup times prevent.

Cooldown Periods

A cooldown period is a waiting time after a scaling action completes before Auto Scaling can trigger another scaling action. Think of it like a "pause button" that gives your infrastructure time to stabilize.

For example, with a 300-second (5-minute) cooldown:

  • Auto Scaling adds 2 instances
  • For the next 5 minutes, it won't add or remove more instances
  • Your metrics can settle and reflect the actual new state

This prevents the "panic scaling" problem described above.

Warmup Time

Warmup time tells Auto Scaling: "Don't count this new instance's metrics for X seconds after launch." New instances often show artificially high CPU or memory usage during startup (loading code, caching data, establishing connections). Without warmup, these startup spikes might trigger more unnecessary scaling.

With a 180-second warmup, Auto Scaling ignores the new instance's contribution to average metrics for 3 minutes, letting it stabilize before influencing future decisions.

Key Takeaway: Cooldown periods prevent rapid re-scaling by adding wait time between actions, while warmup times exclude new instances from metrics during their startup phase—both ensure stable, cost-effective auto scaling.