Why it matters
Development and test clusters are rarely used at night or at weekends, but bill the same as during the working day.How nOps finds it
nOps reads the last 14 days of MongoDB Atlas instance charges for M10 and larger clusters. A cluster is flagged when at least 90% of its cost is non-production (from its tags, then the nOps environment, then the cluster name), it was billed on all 14 days, it averaged at least 20 hours a day, and it ran on at least 3 of the 4 weekend days. Running hours assume a 3-node replica set. The saving is the last 7 days of instance cost, scaled to a month, times the share of the week a 60-hour schedule (12 hours each weekday) would keep it off, and must be at least $5 a month. Clusters mostly paid with Atlas credits (beyond what you pay through a cloud marketplace) are left out.Before you start
Atlas Project Owner or Cluster Manager access, and agreement from the cluster’s users on working hours.How to implement
- Confirm nobody uses the cluster overnight or at weekends, including scheduled jobs and CI.
- Create a schedule that pauses the cluster in the evening and resumes it in the morning on weekdays, for example with an Atlas scheduled trigger or a cron job that calls the Atlas Admin API to set
pausedon the cluster. - Make sure applications and tests handle the cluster being unavailable outside the schedule.
- Check the next week’s Atlas invoice for lower instance charges.
Risks and considerations
- Storage and backups are still billed while the cluster is paused.
- Atlas resumes a paused cluster automatically after 30 days, and a cluster cannot be paused within 60 minutes of resuming.
- If the cluster has more than 3 nodes, the running-hours check reads differently and the saving may vary.
- To roll back, remove the schedule and resume the cluster.
FAQs
What schedule does nOps assume?
What schedule does nOps assume?
12 hours on each weekday, 60 hours a week. A different schedule saves more or less in proportion.