Introduction/Overview - Azure Cosmos DB for MongoDB (2024)

  • Article

APPLIES TO:Introduction/Overview - Azure Cosmos DB for MongoDB (1)MongoDB

Azure Cosmos DB is a fully managed NoSQL, relational, and vector database for modern app development. It offers single-digit millisecond response times, automatic and instant scalability, and guaranteed speed at any scale. It is the database that ChatGPT relies on to dynamically scale with high reliability and low maintenance.

Azure Cosmos DB for MongoDB makes it easy to use Azure Cosmos DB as if it were a MongoDB database. You can use your existing MongoDB skills and continue to use your favorite MongoDB drivers, SDKs, and tools by pointing your application to the connection string for your account using the API for MongoDB.

Azure Cosmos DB for MongoDB provides an SLA that covers the full stack: the database and the underlying infrastructure. Unlike third-party MongoDB services such as MongoDB Atlas, which only cover the database and exclude services, hardware, or software provided by the cloud platform.

Cosmos DB for MongoDB benefits

Cosmos DB for MongoDB has numerous benefits compared to other MongoDB service offerings such as MongoDB Atlas.

vCore architecture (recommended)

A fully managed MongoDB-compatible service with dedicated instances for new and existing MongoDB apps. This architecture offers a familiar vCore architecture for MongoDB users, instantaneous scaling, and seamless native integration with Azure services.

  • Native Vector Search: Seamlessly integrate your AI-based applications with your data that's stored in Azure Cosmos DB for MongoDB vCore. This integration is an all-in-one solution, unlike other vector search solutions that send your data between service integrations.

  • Instantaneous scalability: With Autoscale, your database scales instantaneously with zero warmup period. Other MongoDB offerings such as MongoDB Atlas can take hours to scale up and up to days to scale down.

  • Flat pricing with Low total cost of ownership: Enjoy a familiar pricing model for Azure Cosmos DB for MongoDB vCore, based on compute (vCores & RAM) and storage (disks).

  • Elevate querying with Text Indexes: Enhance your data querying efficiency with our text indexing feature. Seamlessly navigate full-text searches across MongoDB collections, simplifying the process of extracting valuable insights from your documents.

  • Scale with no shard key required: Simplify your development process with high-capacity vertical scaling, all without the need for a shard key. Sharding and scaling horizontally is simple once collections are into the TBs.

  • Free 35 day Backups with point in time restore (PITR): Azure Cosmos DB for MongoDB vCore offers free 35 day backups for any amount of data.

Tip

Visit Choose your model for an in-depth comparison of each architecture to help you choose which one is right for you.

Request Unit (RU) architecture

A fully managed MongoDB-compatible service with flexible scaling using Request Units (RUs). Designed for cloud-native applications.

  • Instantaneous scalability: With the Autoscale feature, your database scales instantaneously with zero warmup period. Other MongoDB offerings such as MongoDB Atlas can take hours to scale up and up to days to scale down.

  • Automatic and transparent sharding: The API for MongoDB manages all of the infrastructure for you. This management includes sharding and optimizing the number of shards. Other MongoDB offerings such as MongoDB Atlas, require you to specify and manage sharding to horizontally scale. This automation gives you more time to focus on developing applications for your users.

  • Five 9's of availability: 99.999% availability is easily configurable to ensure your data is always there for you.

  • Active-active database: Unlike MongoDB Atlas, Cosmos DB for MongoDB supports active-active across multiple regions. Databases can span multiple regions, with no single point of failure for writes and reads for the same data. MongoDB Atlas global clusters only support active-passive deployments for writes for the same data.

  • Cost efficient, granular, unlimited scalability: Sharded collections can scale to any size, unlike other MongoDB service offerings. The Azure Cosmos DB platform can scale in increments as small as 1/100th of a VM due to its architecture. This scalability means that you can scale your database to the exact size you need, without paying for unused resources.

  • Real time analytics (HTAP) at any scale: Run analytics workloads against your transactional MongoDB data in real time with no effect on your database. This analysis is fast and inexpensive, due to the cloud native analytical columnar store being utilized, with no ETL pipelines. Easily create Power BI dashboards, integrate with Azure Machine Learning and Azure AI services, and bring all of your data from your MongoDB workloads into a single data warehousing solution. Learn more about the Azure Synapse Link.

  • Serverless deployments: Cosmos DB for MongoDB offers a serverless capacity mode. With Serverless, you're only charged per operation, and don't pay for the database when you don't use it.

Tip

Visit Choose your model for an in-depth comparison of each architecture to help you choose which one is right for you.

How Azure Cosmos DB for MongoDB works

Cosmos DB for MongoDB implements the wire protocol for MongoDB. This implementation allows transparent compatibility with MongoDB client SDKs, drivers, and tools. Azure Cosmos DB doesn't host the MongoDB database engine. Any MongoDB client driver compatible with the API version you're using should be able to connect, with no special configuration.

Important

This article describes a feature of Azure Cosmos DB that provides wire protocol compatibility with MongoDB databases. Microsoft does not run MongoDB databases to provide this service. Azure Cosmos DB is not affiliated with MongoDB, Inc.

Next steps

  • Read the FAQ
  • Get started with Azure Cosmos DB for MongoDB vCore
  • Connect an existing MongoDB application to Azure Cosmos DB for MongoDB RU
  • Receive up to 63% discount on Azure Cosmos DB prices with Reserved Capacity
Introduction/Overview - Azure Cosmos DB for MongoDB (2024)

FAQs

What is Azure Cosmos DB for MongoDB? ›

Azure Cosmos DB for MongoDB (vCore) provides a comprehensive and integrated solution for resource management, making it easy for developers to seamlessly manage their resources using familiar Azure tools.

What is the difference between Azure Cosmos DB and Azure Cosmos DB API for MongoDB? ›

The API for MongoDB is a great choice if you want to use the broader MongoDB ecosystem and skills, without compromising on using Azure Cosmos DB features. The features that Azure Cosmos DB provides, that you don't have to compromise on includes: Scaling.

What is Azure Cosmos DB in simple words? ›

Azure Cosmos DB is a fully managed NoSQL, relational, and vector database. It offers single-digit millisecond response times, automatic and instant scalability, along with guaranteed speed at any scale.

What is Azure Cosmos DB for MongoDB RBAC? ›

Azure Cosmos DB for MongoDB exposes a built-in role-based access control (RBAC) system that lets you authorize your data requests with a fine-grained, role-based permission model.

What is the difference between Azure DB and Cosmos DB? ›

Azure SQL is based on SQL Server engine, you can easily migrate applications and continue to use the tools, languages, and resources that you're familiar with. Azure Cosmos DB is used for web, mobile, gaming, and IoT application that needs to handle massive amounts of data, reads, and writes at a global scale.

What are the key benefits of Azure Cosmos DB? ›

Azure Cosmos DB offers 99.99% guarantees for availability, throughput, low latency, and consistency on all single-region accounts and all multi-region accounts with relaxed consistency, and 99.999% read availability on all multi-region database accounts.

What are the advantages of MongoDB Atlas over Azure Cosmos DB? ›

Cosmos DB also does not support time-series data. MongoDB, on the other hand, lets you run key-value, graph, and SQL queries against the same data. And, with MongoDB 5.0, you can build and run applications with support for specific time-series data storage and query patterns.

Is cosmos really MongoDB? ›

Azure Cosmos DB is not affiliated with MongoDB, Inc.

What is the maximum database size for Azure Cosmos DB? ›

- Maximum storage per Cosmos DB account: 20 TB (soft limit, can be increased upon request). - Maximum request unit (RU) per second for a single partition key value: 10,000 RU/s for dedicated throughput containers and 4,000 RU/s for shared throughput containers.

Is Cosmos DB relational or NoSQL? ›

As a non-relational database, it can ingest, process and index any type or style of data with massive scale. Additionally, Azure Cosmos DB is a vector database with built-in support for vector search.

Is Azure Cosmos DB serverless or PaaS? ›

Azure Cosmos DB is a fully managed platform as a service (PaaS).

What language does Cosmos DB use? ›

Items can be queried with a read-only, JSON-friendly SQL dialect. As Cosmos DB embeds a JavaScript engine, the SQL API also enables: Stored procedures. Functions that bundle an arbitrarily complex set of operations and logic into an ACID-compliant transaction.

What is the difference between MongoDB and Cosmos DB? ›

MongoDB is strictly a document-based NoSQL database. However, it allows you to run queries against your data as if it is a SQL, key-value, or graph store, whereas Cosmos DB only allows you to run queries of the same type as the data you created.

How to connect MongoDB to Azure Cosmos DB? ›

Get the MongoDB connection string by using the quick start
  1. In an Internet browser, sign in to the Azure portal.
  2. In the Azure Cosmos DB pane, select the API.
  3. In the left pane of the account pane, select Quick start.
  4. Choose your platform (. NET, Node. ...
  5. Copy and paste the code snippet into your MongoDB app.

How to setup MongoDB in Azure? ›

How do I access MongoDB on Azure? Once you have deployed your MongoDB cluster on Azure, either by using MongoDB Atlas or creating a self-managed cluster, use the cluster's connection string to access either from the command line or through a MongoDB driver in your language of choice.

Is Azure Cosmos DB SQL or NoSQL? ›

Azure Cosmos DB for NoSQL is a native non-relational service for working with the document data model. It can arbitrarily store native JSON documents with flexible schema. Data is indexed automatically and is available for query using a flavor of the SQL query language designed for JSON data.

What is the difference between Atlas and Cosmos DB? ›

The biggest difference on a technical level between MongoDB Atlas and CosmosDB is the operating model. While you book dedicated instance sizes or resource types with MongoDB Atlas, CosmosDB runs an operation-based model where the number and type of database operations decide.

What is the difference between Cosmos DB and PostgreSQL? ›

Azure Cosmos DB is designed to handle large-scale, distributed workloads. On the other hand, PostgreSQL is a relational database management system (RDBMS) that follows a client-server architecture. It adheres to the ACID principles, ensuring atomicity, consistency, isolation, and durability for transactions.

What is the difference between Cassandra database and Azure Cosmos DB? ›

Apache Cassandra database is a multi-master system by default, and doesn't provide an out-of-box option for single-region writes with multi-region replication for reads. However, Azure Cosmos DB provides turnkey ability to have either single region, or multi-region write configurations.

References

Top Articles
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 6134

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.