# MongoDB Predictive Auto-Scaling: An Experiment

[MongoDB](https://yomu.fyi/company/mongodb) · A. Jesse Jiryu Davis, Matthieu Humeau · Apr 7, 2026

**Type:** Problem & solution

## Summary

MongoDB Atlas initially relied on a reactive auto-scaler that took minutes to adjust instance sizes and only transitioned between adjacent tiers. Because these delays caused transient server over-utilization or unnecessary customer costs, researchers prototyped predictive auto-scaling to forecast demand. The experimental architecture used short-term and long-term forecasters for customer-driven metrics, an estimator using boosted decision trees to project CPU utilization, and a planner to pick the most cost-effective tier. In testing, the prototype kept replica sets closer to target CPU ranges while saving an average of nine cents per replica set hourly. MongoDB subsequently implemented a production version that scales replica sets up proactively before expected spikes while retaining reactive downscaling.

## Context

MongoDB Atlas previously used only reactive auto-scaling, which scaled instances only between adjacent tiers after detecting several minutes of overload or hours of underload. Scaling operations take several minutes, leaving instances temporarily underloaded or overloaded during sudden workload shifts.

## Approach / What changed

Researchers prototyped a predictive auto-scaler consisting of a long-term forecaster using MSTL and ARIMA, a short-term trend interpolation forecaster, a boosted decision tree CPU estimator, and a planner that selects the cheapest tier to keep CPU utilization under 75 percent.

## Takeaways

- Forecasting models targeted exogenous customer-driven metrics such as queries per second and scanned-objects rate to avoid circular feedback loops caused by scaling CPU capacity.
- The experimental long-term forecaster included a self-censoring confidence mechanism to disregard its predictions for non-seasonal replica sets when recent errors grew large.
- The production rollout in MongoDB Atlas operates conservatively by predicting scale-up events while relying on the reactive auto-scaler to downscale instances after load drops.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Machine Learning](https://yomu.fyi/topic/machine-learning), [Performance](https://yomu.fyi/topic/performance), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://www.mongodb.com/company/blog/engineering/mongodb-predictive-auto-scaling-an-experiment)
