Azure DocumentDB is a managed document database for applications that use MongoDB-compatible APIs. It stores BSON documents and supports CRUD operations, aggregation pipelines, indexing, geospatial queries, and multi-document ACID transactions. Its underlying DocumentDB engine is open source, MIT-licensed, and built on PostgreSQL; the managed service does not run the MongoDB server. Applications connect through MongoDB drivers and tools rather than treating the service as a general-purpose PostgreSQL endpoint.
The service was previously named vCore-based Azure Cosmos DB for MongoDB. That rename did not change existing clusters, connection strings, or APIs. It is separate from Azure Cosmos DB for MongoDB with request-unit-based throughput, Amazon DocumentDB, and the original Azure DocumentDB service that became Azure Cosmos DB in 2017. These distinctions matter when selecting SDKs, estimating costs, and interpreting deployment instructions.
Capacity planning uses dedicated cluster tiers and provisioned storage rather than request units. Compute and storage can scale independently, and existing collections can be sharded online. Storage cannot be decreased on an existing cluster. Select a tier using representative query latency, concurrency, memory consumption, and indexing requirements rather than document count alone. Shard-key selection remains important for distributing writes and avoiding expensive cross-shard operations.
MongoDB wire-protocol compatibility allows existing drivers, mongosh, and MongoDB Compass to connect. Compatibility does not mean every MongoDB administrative command or workload behaves identically. Run a compatibility assessment before migration, then test aggregation pipelines, transactions, indexes, and driver behavior under load. Transactions have a maximum lifetime of 30 seconds, so keep transactional work short and avoid waiting on external services inside a transaction.
For AI applications, documents and their embeddings can reside in the same collection. Paid tiers support DiskANN and HNSW vector indexes, allowing applications to retrieve similar documents without maintaining a separate vector database. Generate embeddings in an application or model service, persist their model and version metadata, and keep vector dimensions consistent with the index configuration. Advanced full-text search, including BM25 ranking, fuzzy matching, and proximity search, is in public preview.
Production deployments should explicitly configure availability, networking, authentication, and observability. The service supports optional high availability, private endpoints, Microsoft Entra ID authentication, and Azure Monitor integration. Database- and collection-scoped fine-grained role-based access control is in public preview. Validate regional and tier availability before depending on a capability, and test client reconnection and recovery procedures.
Paid clusters include automated backups and point-in-time restore, with retention depending on the tier. The free tier is useful for development but excludes high availability, backup and restore, Microsoft Entra ID authentication, advanced vector indexes, and diagnostic logging. For migration, use Azure Database Migration Service, the migration extension for Visual Studio Code, or native MongoDB export and restore tools. Online migration requires source change streams and a planned final cutover.