MongoDB Atlas Autoscaling automatically changes both the storage and compute capacity of your MongoDB Atlas cluster, in response to changing traffic patterns. This enables MongoDB Atlas to continuously maximize performance while minimizing cost, with just a press of a button. Please visit the session to learn more about how autoscaling works behind-the-scenes and the best ways to use it.
9. #MDBLocal
How does it work?
Storage
For any given compute, provision the right disk
space
Automatically increases disk space to keep up
with writes
Compute
Adjusts the CPU and Memory provisioned to
keep up with workload
If workload increases, scale up to perform
If workload decreases, scale down to save
10. #MDBLocal
How do we do it?
Monitor Performance
& Learn
● Actually easier?
● How do we know we are
doing well?
● How do we know we are
not?
● How can we learn and
improve the system
Predict Future Workload
● Not easy :)
● Up
○ Too fast wastes $
○ Too slow degrades
performance
● Down
○ Too fast degrades
performance
○ Too slow wastes $
Adjust Capacity Safely
● Not easy :)
● Scaling is expensive
● How do we reduce
impact to app?
feedback
11. #MDBLocal
Step 1: Predicting Future Workload using Expert Learning
Up Scaling
Normalized CPU Util > 75%
OR Memory Util > 75%
For at-least 1 hour
Checked every 5 minutes
Down Scaling
Normalized CPU Util <50%
AND Memory Util <50%
For at-least 72 hour
Checked every 5 minutes
12. #MDBLocal
2. Perform Scaling Operations
User
Atlas
Metrics
Atlas
predicts
future
utilization
Executes
autoscalin
g
decisions
Check user
specified
conditions
Automated
hardware
provisionin
g
Atlas
automatically
changes
cluster’s
computation
capacity with
no downtime
Utilization
metrics are
captured in
real time
User
Alerts to
users
13. #MDBLocal
Step 3: Monitor Performance & Learn
Telemetry tracking how well we are predicting
Telemetry tracking how the workload pattern
changes
Testing new algorithms with historic data to improve
performance
Ability to tune algorithm per cluster, if needed
16. #MDBLocal
When to use autoscaling?
If utilization is variable throughout the day or week & you want to save $
If you want to not worry about scaling your cluster as you grow over time
If you have very high utilization & you are afraid of oversaturating your cluster
But don't forget to use ATLAS Performance Advisor
to optimize your queries !
17. #MDBLocal
Real life behavior
High CPU utilization indicates
that the Atlas cluster tier is
insufficient to meet the workload
requirements
After auto-scaling, CPU
utilization drops indicating the
Atlas cluster is sufficiently sized
22. Who am I?
● Software engineer on Private Cloud
Kubernetes team
● MongoDB Enterprise Operator
● Lead development on the Atlas Open
Service Broker
23. Why should you listen?
● Manage your MongoDB clusters inside of Kubernetes
● Consistency
● Easily replicable
● No custom scripts
24. What is a service broker?
● An application that implements the Open Service Broker
API
● Provision third-party resources from within a platform
25. What is the Atlas service broker?
● Application you run inside of Kubernetes
● Exposes a standard API
● Manage Atlas clusters and users with Kubernetes
resources