1---2name: azure-documentdb3description: Expert knowledge for Azure DocumentDB development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using DocumentDB search (BM25/vector), Data API, MongoDB compatibility, change streams, or cross-region replication, and other Azure DocumentDB related development tasks. Not for Azure Cosmos DB (use azure-cosmos-db), Azure Table Storage (use azure-table-storage), Azure SQL Database (use azure-sql-database), Azure SQL Managed Instance (use azure-sql-managed-instance).4---5# Azure DocumentDB Skill
6
7This skill provides expert guidance for Azure DocumentDB. Covers troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. It combines local quick-reference content with remote documentation fetching capabilities.
8
9## How to Use This Skill
10
11> **IMPORTANT for Agent**: Use the **Category Index** below to locate relevant sections. For categories with line ranges (e.g., `L35-L120`), use `read_file` with the specified lines. For categories with file links (e.g., `[security.md](security.md)`), use `read_file` on the linked reference file
12
13> **IMPORTANT for Agent**: If `metadata.generated_at` is more than 3 months old, suggest the user pull the latest version from the repository. If `mcp_microsoftdocs` tools are not available, suggest the user install it: [Installation Guide](https://github.com/MicrosoftDocs/mcp/blob/main/README.md)
14
15This skill requires **network access** to fetch documentation content:
16- **Preferred**: Use `mcp_microsoftdocs:microsoft_docs_fetch` with query string `from=learn-agent-skill`. Returns Markdown.
17- **Fallback**: Use `fetch_webpage` with query string `from=learn-agent-skill&accept=text/markdown`. Returns Markdown.
18
19## Category Index
20
21| Category | Lines | Description |
22|----------|-------|-------------|
23| Troubleshooting | L37-L45 | Diagnosing and fixing DocumentDB issues: common errors, CMK encryption problems, query performance via explain(), connectivity, and replication troubleshooting. |
24| Best Practices | L46-L56 | Best practices for DocumentDB indexing and queries, safe index changes, and configuring cross-region replication and high availability for resilient, performant data access. |
25| Decision Making | L57-L72 | Guides for choosing between DocumentDB and MongoDB services, planning migrations, configuring cross-region failover, and selecting optimal vector search/index algorithms across languages. |
26| Architecture & Design Patterns | L73-L84 | Patterns for scaling, HA/DR, sharding, multi‑cloud setups, and building Go/TypeScript AI agents (including autonomous travel) on Azure DocumentDB. |
27| Limits & Quotas | L85-L98 | Limits, quotas, and configuration constraints for DocumentDB: compute/storage tiers, free tier caps, SSD performance, indexing/text index limits, document/batch sizes, diagnostics, and feature availability. |
28| Security | L99-L110 | Securing DocumentDB clusters: encryption at rest and with customer keys, firewall and public access controls, Private Link, Entra ID RBAC, native users/privileges, and security best practices. |
29| Configuration | L111-L131 | Configuring DocumentDB features: search (BM25, vector, fuzzy, phrase, geo), MongoDB compatibility, change streams, replication/scale, transactions, Data API, alerts, and monitoring. |
30| Integrations & Coding Patterns | L132-L157 | Patterns and code to connect apps and AI/RAG tools to Azure DocumentDB, including drivers, HTTPS Data API, migrations (Mongo/Cassandra), vector search, and sample app integrations. |
31| Deployment | L158-L164 | Guides for deploying and managing DocumentDB clusters: local dev to Azure, backup/restore, version upgrades, and IaC deployment with Bicep and Terraform. |
32
33### Troubleshooting
34| Topic | URL |
35|-------|-----|
36| Troubleshoot common Azure DocumentDB issues | https://learn.microsoft.com/en-us/azure/documentdb/faq |
37| Troubleshoot CMK encryption issues in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-database-encryption-troubleshoot |
38| Diagnose query performance using explain() in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-read-explain-output |
39| Troubleshoot common Azure DocumentDB errors and connectivity | https://learn.microsoft.com/en-us/azure/documentdb/troubleshoot-common-issues |
40| Troubleshoot Azure DocumentDB replication issues | https://learn.microsoft.com/en-us/azure/documentdb/troubleshoot-replication |
41
42### Best Practices
43| Topic | URL |
44|-------|-----|
45| Use background indexing safely in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/background-indexing |
46| Apply cross-region replication best practices in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/cross-region-replication |
47| Implement HA and replication best practices in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/high-availability-replication-best-practices |
48| Apply indexing best practices for Azure DocumentDB collections | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-indexes |
49| Explore practical indexing scenarios in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-index |
50| Safely migrate from non-ordered to ordered indexes in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-ordered-indexes |
51| Optimize Azure DocumentDB queries with Index Advisor | https://learn.microsoft.com/en-us/azure/documentdb/index-advisor |
52
53### Decision Making
54| Topic | URL |
55|-------|-----|
56| Choose Azure first-party services for MongoDB workloads | https://learn.microsoft.com/en-us/azure/documentdb/azure-mongo-first-party |
57| Decide between Azure DocumentDB and MongoDB Atlas | https://learn.microsoft.com/en-us/azure/documentdb/compare-mongodb-atlas |
58| Choose cross-region failover modes in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/failover-modes |
59| Assess MongoDB readiness and plan migration to DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-assess-plan-migration-readiness |
60| Evaluate MongoDB compatibility in managed services | https://learn.microsoft.com/en-us/azure/documentdb/managed-service-compatibility |
61| Choose migration options from MongoDB to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/migration-options |
62| Choose migration options from MongoDB to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/migration-options |
63| Evaluate vector search algorithms with .NET | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet-select-algorithm |
64| Compare vector index options in Go on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go-select-algorithm |
65| Test and select vector indexes with Java | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java-select-algorithm |
66| Choose vector index algorithms using TypeScript | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs-select-algorithm |
67| Select optimal vector index and similarity in Python | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python-select-algorithm |
68
69### Architecture & Design Patterns
70| Topic | URL |
71|-------|-----|
72| Apply autoscale behavior for Azure DocumentDB workloads | https://learn.microsoft.com/en-us/azure/documentdb/autoscale |
73| Understand HA and DR internals for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/availability-disaster-recovery-under-hood |
74| Plan high availability for Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/high-availability |
75| Design multi-cloud architectures with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/multi-cloud |
76| Design sharding strategy for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/partitioning |
77| Implement Go-based AI agents with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-agent-go |
78| Build TypeScript AI agents with DocumentDB vector search | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-agent-nodejs |
79| Design an autonomous travel agent with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-ai-agent |
80
81### Limits & Quotas
82| Topic | URL |
83|-------|-----|
84| Use supported compute and storage configurations in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compute-storage |
85| Use supported compute and storage configurations in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compute-storage |
86| Understand Azure DocumentDB Free Tier limits and features | https://learn.microsoft.com/en-us/azure/documentdb/free-tier |
87| Configure Premium SSD v2 performance for DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/high-performance-storage |
88| Configure text indexes and understand their limits in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-text-index |
89| Enable diagnostic logs for Azure DocumentDB with tier constraints | https://learn.microsoft.com/en-us/azure/documentdb/how-to-monitor-diagnostics-logs |
90| Understand indexing behavior and limits in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/indexing |
91| Reference service limits and quotas for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/limitations |
92| Document size and batch write limits in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/max-document-size |
93| Track Azure DocumentDB feature releases and previews | https://learn.microsoft.com/en-us/azure/documentdb/release-notes |
94
95### Security
96| Topic | URL |
97|-------|-----|
98| Understand encryption at rest for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/database-encryption-at-rest |
99| Configure Azure DocumentDB firewall access rules | https://learn.microsoft.com/en-us/azure/documentdb/how-to-configure-firewall |
100| Configure Entra ID RBAC authentication for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-connect-role-based-access-control |
101| Configure customer-managed encryption keys for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-data-encryption |
102| Secure Azure DocumentDB with Azure Private Link | https://learn.microsoft.com/en-us/azure/documentdb/how-to-private-link |
103| Manage public network access to Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/how-to-public-access |
104| Manage secondary native users and privileges in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/secondary-users |
105| Apply security best practices to Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/security |
106
107### Configuration
108| Topic | URL |
109|-------|-----|
110| Configure and use change streams in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/change-streams |
111| Configure MongoDB feature compatibility in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compatibility-features |
112| Use MongoDB query language features on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compatibility-query-language |
113| Configure fuzzy full-text search in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-fuzzy |
114| Configure hybrid BM25 and vector search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-hybrid |
115| Set up BM25 keyword search indexes on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-keyword |
116| Configure full-text search in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-overview |
117| Implement phrase and proximity search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-phrase-proximity |
118| Configure and run geospatial queries in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/geospatial-support |
119| Configure wildcard indexes for dynamic schemas in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-wildcard-indexes |
120| Create and use replica clusters in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-cross-region-replica-portal |
121| Configure metric-based alerts for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-manage-alerts |
122| Scale and configure Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/how-to-scale-cluster |
123| Configure multi-operation transactions in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-transactions |
124| Configure and use the Azure DocumentDB MCP Toolkit | https://learn.microsoft.com/en-us/azure/documentdb/mcp-toolkit |
125| Monitor Azure DocumentDB metrics and resource usage | https://learn.microsoft.com/en-us/azure/documentdb/monitor-metrics |
126| Configure integrated vector store in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/vector-search |
127
128### Integrations & Coding Patterns
129| Topic | URL |
130|-------|-----|
131| Use LangChain Azure AI vector store with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/build-rag-applications |
132| Integrate Haystack RAG pipelines with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/build-rag-pipelines |
133| Convert Cassandra schemas to Azure DocumentDB with VS Code | https://learn.microsoft.com/en-us/azure/documentdb/cassandra-how-to-schema-conversion-vs-code |
134| Use Azure DocumentDB Data API over HTTPS | https://learn.microsoft.com/en-us/azure/documentdb/data-api |
135| Connect Azure Databricks to Azure DocumentDB with Spark | https://learn.microsoft.com/en-us/azure/documentdb/how-to-connect-from-databricks |
136| Migrate MongoDB to DocumentDB using native tools | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-native-tools |
137| Migrate MongoDB using Azure DocumentDB VS Code extension | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-vs-code-extension |
138| Persist LangGraph agent state in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/persist-agent-state |
139| Integrate LlamaIndex vector store with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/query-knowledge-base |
140| Integrate .NET/C# apps with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet |
141| Perform vector search with .NET on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet-vector-search |
142| Use Go drivers with Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go |
143| Implement vector search in Go on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go-vector-search |
144| Connect Java applications to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java |
145| Use Java for vector search on Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java-vector-search |
146| Use Node.js drivers with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs |
147| Use Node.js for vector search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs-vector-search |
148| Connect Python applications to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python |
149| Implement vector search in Python on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python-vector-search |
150| Integrate Rust applications with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-rust |
151| Generate AI advertisements using DocumentDB and OpenAI | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-ai-advertisement-generation |
152| Build a MERN web app with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-nodejs-web-app |
153
154### Deployment
155| Topic | URL |
156|-------|-----|
157| Develop locally with DocumentDB and deploy to Azure | https://learn.microsoft.com/en-us/azure/documentdb/development-loop |
158| Upgrade Azure DocumentDB clusters to newer MongoDB versions | https://learn.microsoft.com/en-us/azure/documentdb/how-to-upgrade-cluster |
159| Deploy Azure DocumentDB clusters with Bicep | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-bicep |
160| Deploy Azure DocumentDB clusters using Terraform | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-terraform |