Documentdb Driver

MongoDB driver and SDK best practices for Azure DocumentDB — singleton `MongoClient`, connection reuse, connection-pool fundamentals. Use when writing code that instantiates a MongoDB client, reviewing driver initialization, or diagnosing connection-related bugs. For full connection-pool tuning (serverless vs OLTP vs OLAP, timeouts, retries), see the `documentdb-connection` skill.

Azure Updated 282 repo stars

File contents

Driver Best Practices — Azure DocumentDB

MongoDB driver usage patterns that apply across Node.js, Python, Java, Go, and .NET. For in-depth pool-size / timeout / retry tuning, see the documentdb-connection skill.

Rules

  • driver-singleton-client — Reuse MongoClient as a process-wide singleton; never create a new client per request.

azure/documentdb-agent-kit commit 26941a28f5

Frequently asked questions

npx get-skill add azure/documentdb-driver