Hermes Wiki

Autoscaling Strategies

Concept

Autoscaling adjusts compute capacity to match demand automatically, and the strategy chosen decides how early the system reacts relative to the demand that's about to hit it:

  • Reactive (threshold-based) scaling — the classic approach: monitor a metric (CPU utilization, request latency, queue depth) and add/remove capacity once it crosses a defined threshold. Simple, requires no forecasting, but is fundamentally after the fact — by the time CPU hits 80% and a scale-out fires, new instances still need boot/warm-up time, during which the existing fleet absorbs the overload.
  • Scheduled scaling — pre-defined rules tied to known times (scale up every weekday 8am, scale down at 8pm; add capacity before a known Black Friday-style event). Zero forecasting needed and completely predictable, but only works for traffic patterns that are genuinely calendar-driven — it does nothing for an unexpected spike.
  • Predictive scaling — uses historical traffic data (often ML-based forecasting) to provision capacity ahead of anticipated demand, rather than waiting for a threshold breach. Meaningfully reduces the cold-start gap reactive scaling suffers from, at the cost of depending on a forecasting model that can be wrong for genuinely novel traffic patterns.
  • Hybrid scaling — predictive or scheduled scaling handles the known/recurring shape of demand, with reactive scaling layered on top as a safety net for whatever the forecast misses. This is the practical default in most mature setups — no single strategy alone covers both "the traffic we can predict" and "the traffic we can't."

Tradeoffs

Strategy Responsiveness Cost efficiency Forecasting dependency Failure mode
Reactive Lags behind demand by the metric-detection + instance-boot delay Good — capacity tracks actual load, no speculative headroom None Brief overload/latency spike during the scale-out lag
Scheduled Instant, since capacity is already provisioned ahead of time Good if the schedule matches real demand; wasteful if it doesn't None (no ML), but requires accurate manual pattern knowledge Under-provisioned for any demand outside the known schedule
Predictive Provisions ahead of the actual demand curve Best when the forecast is accurate — no lag, no manual guesswork High — a wrong forecast either over-provisions (wasted cost) or under-provisions (same lag as reactive, but unexpectedly) Novel/unprecedented traffic shapes the model hasn't seen
Hybrid Best of both — predictive/scheduled for known shape, reactive as a backstop Best overall balance Moderate — reactive layer limits the damage of a bad forecast Rare — only fails if both layers miss simultaneously

The underlying tension is the same cost-vs-responsiveness tradeoff that runs through every capacity decision: reactive scaling is the cheapest and simplest but structurally cannot eliminate the scale-out lag; predictive scaling closes that gap but replaces "no dependency" with "dependency on a forecasting model being right," which is its own risk to own.

When to use / when not to

  • Use reactive scaling as the baseline for any service — even when scheduled or predictive scaling is layered on top, a metric-based safety net catches whatever the other layers didn't anticipate.
  • Use scheduled scaling when demand is genuinely calendar-driven and known in advance (batch jobs, business-hours-only internal tools, planned marketing events) — it's the cheapest way to eliminate cold-start lag for predictable load.
  • Use predictive scaling once traffic has enough historical volume and recurring shape (daily/weekly cycles) for a forecast to actually beat a simple threshold rule — it's not worth the modeling overhead for a low-traffic or highly erratic service.
  • Skip predictive scaling for genuinely novel or one-off traffic (a brand-new product launch with no history) — there's no historical pattern to learn from, and reactive-plus-generous-headroom is the honest answer.
  • In cost-sensitive environments, pair any scaling strategy with a hard ceiling (max instance count) — autoscaling without an upper bound turns a traffic spike (legitimate or an attack) into an uncapped bill.

Common pitfall

Tuning the reactive-scaling threshold and cooldown period once at launch and never revisiting it as traffic patterns actually evolve — a threshold set for last year's peak traffic either scales too late (threshold set too high for current baseline) or thrashes constantly (scaling up and down repeatedly because the cooldown window is too short relative to real traffic variance). Autoscaling configuration is not a "set once" decision; it needs the same periodic tuning as capacity planning itself.

Engineering Lens

Autoscaling strategy is a direct, provable cost-vs-performance negotiation, and the Principal-level framing is being able to quantify the actual cost of the scale-out lag in business terms — a few minutes of degraded latency during a reactive scale-out might be a non-issue for an internal dashboard and a real revenue-impacting event for a checkout flow, and that difference is what should drive whether the extra complexity of predictive scaling is worth owning. In a review, naming the specific cost of getting it wrong in each direction — over-provisioned headroom burning budget every day vs. under-provisioned capacity causing real latency/availability incidents during real traffic — is what signals ownership over "we use autoscaling," which says nothing about whether it's tuned correctly. This is directly relevant to Fintech/Capital Markets systems where a scale-out lag during a trading-hours volume spike has a very different cost profile than the same lag on a back-office reporting service.

Sources

Hermes Wiki