Capacity Forecasting

ML approaches to predicting resource needs before they become incidents — Prophet for seasonal decomposition, ARIMA/SARIMA for stationary series, STL residual forecasting. Covers Netflix Scryer, Uber Argos scale patterns, confidence intervals for pre-scaling decisions, and connecting forecasts to cloud cost optimization.

Overview

From reactive to predictive

Static capacity alerts fire when a resource is already constrained; forecasting says when it will be, with lead time to act. "Your disk will fill in 18 hours" versus "your disk is now full" is the difference between a planned maintenance window and a 3am P1.

Why static thresholds fail

  • Reactive by design — The alert fires only after capacity is constrained — Lead time to act before the constraint
  • Seasonality-blind — A service peaking every Monday at 9am fires the same "CPU above 80%" alert every Monday, carrying no information — Seasonal context: Monday peaks are normal, so alert at 90% not 80%
  • Growth-blind — A service growing 20 percent month-over-month outgrows a threshold set six months ago — Growth awareness: the trend predicts exhaustion on a specific date

The algorithm hierarchy

  • Prophet (Meta, 2017) — Bayesian additive model: piecewise trend, Fourier seasonality, explicit holiday regressors; forecasts with confidence intervals — The standard start for clear daily or weekly seasonality; changepoint_prior_scale is the key lever (low for stable services, higher for fast-growing ones)
  • Netflix Scryer — Extends Prophet with weekly periodicity detection and Isolation Forest contamination adjustment — Cleans historical anomalies out of training data
  • ARIMA, SARIMA — Classical time-series models — Stationary or single-season series where Prophet's complexity is unnecessary
  • STL decomposition — Preprocessing that separates trend and seasonal components — Allows simpler models on each component
  • DeepAR (Amazon) — Trains many related series jointly — Large fleets

Connecting forecasts to operations

A forecast is only valuable if it drives action, and the action depends on how long each scaling mechanism takes.

  • Upper-band breach expected sooner than the mechanism's lead time — Automated scaling
  • Breach further out — Scheduled capacity work
  • Upper 80% CI breach in 24 hours — Manual review
  • Upper 95% CI breach in 4 hours — Auto-scale

> [!IMPORTANT] Track MAPE (Mean Absolute Percentage Error) weekly per service so models are retuned when traffic patterns change.

Interview questions

  • How would you build a capacity forecasting system for a 200-service microservices platform?
  • Explain how Prophet handles seasonality and when the model fails in practice.
  • How does capacity forecasting connect to auto-scaling and pre-scaling decisions?
  • What is the Uber Argos approach to capacity forecasting and what makes it different from a single-service Prophet model?
  • How do you integrate capacity forecasting with FinOps to reduce cloud costs without sacrificing reliability?

Sign up free to read the full topic

More AIOps topics

Start free on Cariara · Coding problems · System design studio