Select Page

MongoDB: Make a Cloud-native Switch with Azure Cosmos DB

Author: Charleste King | | September 28, 2021


MongoDB is an excellent NoSQL database to take from on-premises to the cloud, but choosing the right deployment option can be challenging. One solution to consider is using Microsoft Azure Cosmos DB in tandem with its open-source MongoDB API.

What is Azure Cosmos DB

Azure Cosmos DB is a fully managed NoSQL platform set up on Microsoft’s Azure cloud. It’s designed for demanding workloads that require 99.999 percent availability and single-digit millisecond responses. This speed is guaranteed at any scale for your application, which gives you the future-proofed platform needed to grow with your business.

Azure Cosmos DB not only adapts to your capacity requirements, but it handles them automatically and immediately. This means you don’t have to worry about manually scaling your application as its demand changes.

This platform’s features include: 

  • Fast reads and writes
  • Integrated caching
  • Turnkey data replication
  • Multi-region and multi-master writes
  • Integration with Azure Synapse Link for Azure Cosmos DB, enabling no-ETL analytics
  • No limits on your application’s scale
  • SDKs and APIs for popular languages and databases, including MongoDB
  • Enterprise-grade security
  • Pricing model based on your actual resource consumption
  • SLA-backed always-on availability

Benefits of Migrating MongoDB to Azure Cosmos DB

The Azure Cosmos DB open-source API for MongoDB gives you an almost identical experience to your current MongoDB databases. Your team doesn’t need to learn a new database technology, as you can leverage the skills you already have with this platform. You’re also able to use your favorite MongoDB tools, drives, and SDKs.

When you shift your MongoDB instances to Cosmos DB, you open up a stellar cloud-native environment. The fully managed services drastically reduce the time you need to spend on managing the underlying hardware and software for MongoDB. One of the standout features of Cosmos DB is automatic sharding, which sets your application up for instant scaling.

Since you only pay for what you use on this platform, getting these automated features can help your company reduce costs. The increments you scale at go as low as 1/100th of a VM, so your pricing is dialed in on a granular level. You also have the option of using a serverless capacity mode, which you pay for on a per-operation basis.

Azure Cosmos DB offers a free tier that has 1,000 RU/s and 25 GB of storage. You can set up a proof of concept to explore whether the MongoDB API suits your needs before investing any money into the platform. Then, when you’re ready to upgrade, you can change your account tier in a few seconds. No downtime is involved in the upgrading process.

You can adjust your database performance on a container or a database level by changing the number of Request Units (RU) for that account. Choosing the container method gives you fine-tuned control over the throughput for each part of your database. The database method is best suited for highly predictable workloads.

Another advantage of using Azure Cosmos DB for your MongoDB databases is gaining access to global multi-region zones. You can deploy instances to the regions containing the bulk of your users, and adjust these regions as your user base changes and grows. While single-region deployments are available, they are only guaranteed for 99.99% availability. You need to expand to multiple regions to get the 99.999% availability.

Learn more about our MongoDB to Azure Cosmos DB Migration Support.

Planning Your MongoDB to Cosmos DB Migration

Cosmos DB does not support all MongoDB versions, so it’s important to confirm that your databases are eligible for this migration. If they are not on the supported list, you may want to consider an upgrade.

You can migrate to this cloud-native platform with either online or offline migrations.

  • Online migration: Your MongoDB databases stay up during the migration process. If transactions come in while the migration is in progress, they get sent to Cosmos DB with no loss. The only time your databases have downtime with online migrations is when you cut over to the new platform. The drawback of this method is that it takes longer to go from start to finish.
  • Offline migration: Your databases are taken offline for the entire migration, stopping all connections until the new database is available. The overall process is faster than online migrations, but you have to deal with much more extended downtime.

Getting the most out of a MongoDB to Azure Cosmos DB migration requires significant hands-on expertise with both systems. In addition, you may need to modernize your MongoDB on-premises database to take full advantage of the cloud-native features of Cosmos DB. Datavail is here to help guide you through the migration and optimization process from start to finish.

We are a Microsoft Gold Partner with extensive experience in NoSQL database migrations. Our certified MongoDB DBAs and architects use a proven solution to deliver reliable and top-performing databases while minimizing the downtime and disruption involved in the migration.

Contact us to start the transformation process of your on-premises MongoDB databases with an Azure Cosmos DB migration.

How to Solve the Oracle Error ORA-12154: TNS:could not resolve the connect identifier specified

The “ORA-12154: TNS Oracle error message is very common for database administrators. Learn how to diagnose & resolve this common issue here today.

Vijay Muthu | February 4, 2021

Data Types: The Importance of Choosing the Correct Data Type

Most DBAs have struggled with the pros and cons of choosing one data type over another. This blog post discusses different situations.

Craig Mullins | October 11, 2017

How to Recover a Table from an Oracle 12c RMAN Backup

Our database experts explain how to recover and restore a table from an Oracle 12c RMAN Backup with this step-by-step blog. Read more.

Megan Elphingstone | February 2, 2017

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.


Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.