Loading…
MongoDB Predictive Auto-Scaling: An Experiment
MongoDBA. Jesse Jiryu Davis, Matthieu Humeau
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.
Related reading
MongoDB ·
10 Years of MongoDB Atlas: Built for What’s Next
Launched in 2016, MongoDB Atlas was designed to bring MongoDB's developer experience to the cloud while eliminating operational overhead for production environments. Over ten years, Atlas expanded beyond a managed database into a multi-cloud data platform that supports multi-document ACID transactions, Queryable Encryption, native search, and stream processing. The platform introduced Atlas Vector Search in 2023 and acquired Voyage AI in 2025 to embed advanced embedding and reranking models natively. These integrated capabilities address the requirements of retrieval-augmented generation and autonomous AI agents without relying on disparate vector stores or sync pipelines. Atlas now serves more than three trillion queries daily across over 125 AWS, Google Cloud, and Microsoft Azure regions for nearly 70,000 customers.
Ben CefaloGrab ·
Machine-learning predictive autoscaling for Flink