Table of Contents In this article, we will delve into an intriguing aspect of identifying the optimal and cost-effective solution for hosting a MongoDB deployment. MongoDB clusters can be set up in a myriad of ways, whether in a self-managed environment—which is a common practice—or through enterprise Database as a Service (DBaaS) offerings like MongoDB […]
The post Cost savings by migrating from MongoDB on Atlas to Self-Managed first appeared on KloudDB.
Cost savings by migrating from MongoDB on Atlas to Self-Managed appeared first on MariaDB.org
In this article, we will delve into an intriguing aspect of identifying the optimal and cost-effective solution for hosting a MongoDB deployment.
MongoDB clusters can be set up in a myriad of ways, whether in a self-managed environment—which is a common practice—or through enterprise Database as a Service (DBaaS) offerings like MongoDB Atlas or ObjectRocket. For a fair analysis, we will narrow our focus to MongoDB Atlas, juxtaposing a commercial product against a community-driven open-source alternative.
Our comparison will pivot on the following key aspects:
Through this examination, we aim to furnish a well-rounded perspective that could assist in making informed decisions regarding MongoDB deployment solutions.
Let’s explore a scenario where we operate a MongoDB sharded cluster, and compare the costs associated with managing it on MongoDB Atlas versus self-managed cloud Virtual Machines (VMs). We will delve into the available options in the following section.
This calculation is made for an unsharded 3 node replica set . Given below are backup size , workload type , Retention , Number of requests etc..
Dataset Size: 1TB (on disk) , OR 3TB (logical)
Number of requests per sec: 10K
Type of workload: 50% reads and 50% writes
Storage Type : SSD
Backup size : 1.5TB
Frequency of backups : Every 24 hours (full)
Retention: 30 days

Please be aware that the provided figures are estimates and might deviate.
In the following section, we’ll focus on the post-migration backup configuration, which includes:
For a clearer understanding of the backup data volume:
The expected monthly cost for this configuration is approximately USD 3,000.It’s worth noting that there won’t be any network transfer expenses if the S3 region aligns with the EC2 instance region. Minimal requests to the S3 bucket also mean we can disregard its charges.
Given this, the total estimated costs for Network and Storage (backups) in AWS post-migration would be around USD 4,300 monthly, while the cost to operate the EC2 instances is projected at USD 1,700.
This brings the total monthly expense for maintaining three EC2 instances to approximately USD 6,000.
Regarding Atlas pricing on AWS, according to the documentation, the M60 Cluster Tier is required, costing about USD 3,000 per month for each instance, amounting to USD 9,000 in total.
For the backups, given the same size, frequency, and retention, the expected cost is around USD 4,500.
Thus, the cumulative expense is projected at approximately USD 13,500.
However, please bear in mind that these figures might not be entirely precise due to various influencing factors. Our calculations are based on general usage assumptions.

After migrating, the anticipated savings amount to:
An estimated monthly saving of USD 7,500, representing a savings rate of approximately 55%.
Note – There are also costs associated with Data transfer in some cases .. You need to add that to calculation
As initially pointed out, the choices are limited when it comes to open-source solutions driven by the community . Notable among these are Percona Server for MongoDB and FerretDB, which is compatible with MongoDB.
In this blog, as we delve into the case study of a self-managed MongoDB deployment, our primary focus will be on Percona Server for MongoDB. However, stay tuned for a detailed exploration of FerretDB in an upcoming blog post.
Below is the high level plan for actual migration activity which includes,
Below diagram depicts the target architecture (After migrating from MongoDB Atlas)

Once the EC2 instances are set up in the specified regions, we can proceed with the steps to deploy a replica set using Percona Server for MongoDB. Detailed steps are given in percona docs https://docs.percona.com/percona-server-for-mongodb/5.0/install/index.html
Once installation finishes, follow steps here and start the replica set( replica set members are NodeA, NodeB and NodeC in this example scenario)
Let’s assume the URI or connection string for connecting to the replica set is as follows:
Now, set up a user and grant them the ‘readWriteAnyDatabase’ role so they can be involved in the migration
B. Performing migration of dataTo start migration using MongoPush, HummingBird, or MongoShake, there are several prerequisites to fulfill. Given that the MongoPush repository is now private, follow the steps below to retrieve the binary and begin its use
Ensure that a dedicated user is created in the Atlas source cluster, endowed with the readAnyDatabase and clusterMonitor roles, for use during migration.
To sum it up, MongoPush operates by replicating data from the source cluster to the target cluster in batches, mirroring the actions of a secondary node in a replica set. The following image illustrates the overall process, showcasing how data is replicated in multiple parallel tasks or batches

After the migration is complete and both the source and target clusters are confirmed to be in sync, the following steps should be undertaken:
Note: There won’t be any significant downtime, just a brief moment when the driver redirects the application to the new cluster using its connection string. The total duration for migration completion varies based on factors such as network conditions, write activity on the source cluster, and the volume of data/indexes, among others
C. Deploying Open Source Monitoring and AlertingWhile numerous free solutions exist, we prefer Percona Monitoring and Management because it closely matches Atlas in offering comprehensive metrics and an integrated alerting system. You can learn more by going here
The PMM platform is based on a client-server model that enables scalability. It includes the following modules:


Installation instructions can be followed from here Comparison between Atlas Monitoring and PMM Monitoring.
Alerting:
We can utilize PMM for alerting as it offers extensive customizable alerting rules and templates. There’s no need for a separate installation for this purpose. Detailed documentation can be found here.
Complete documentation is available here including installation guide as well.

Features :
There are various methods to enhance the security of a database stack, including transport encryption (utilizing SSL/TLS), LDAP, or encryption at rest by employing an external database to encrypt underlying data files. As these features are exclusive to the paid MongoDB Enterprise versions, we’ll be using Percona Server for MongoDB for these functionalities as well.
ConclusionIn the next part we will blog about FerretDB and how you can save costs by migrating your Atlas clusters to FerretDB
Please check “Kmon” , “KloudDB Shield” and “KloudDB School” .Also check our performance articles –Pg_fincore and pg_buffercache to troubleshoot performance issues , Pgbouncer multiple instances(How we increased our TPS using multiple instances) , Postgres and temporary files , Pgpool and performance tuning, How we improved Lambda performance by 130x etc..
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Introducing 🍃MClusterAdmin: A Lightweight GUI Tool for MongoDB DBAs | 0 | 6.03 | 27-07-2026 |
| 2 | The open way of Percona Search for MongoDB | 0 | 5.15 | 07-08-2026 |
| 3 | How to Provision a MongoDB Cluster in Kubernetes with Percona Everest Summary | 0 | 4.88 | 02-05-2024 |
| 4 | Our Experience at MongoDB.local London 2026: The Era of AI Agents, Badges, and Surviving on Chips! | 0 | 6.66 | 11-05-2026 |
| 5 | Guide Multi-Cluster MongoDB on GKE with MCS, Percona Operator | 0 | 8.47 | 12-06-2026 |
| 6 | Open Door MongoDB Chats | 0 | 9.9 | 26-03-2024 |
| 7 | Comprehensive Self-Service Backups for Continuous Data Protection in MariaDB Cloud | 0 | 8.56 | 09-06-2026 |
| 8 | The “bus factor” risk in MongoDB, MariaDB, Redis, MySQL, PostgreSQL, and SQLite | 0 | 5.46 | 03-03-2026 |
| 9 | ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments | 0 | 8.26 | 05-08-2026 |
| 10 | Is it possible for a DBA/DBE to earn 1 million USD annual compensation ? | 0 | 7.46 | 28-09-2023 |