A scalable, fully managed NoSQL database for JSON documents with fast queries and automatic indexing
Hi ,
Thanks for reaching out to Microsoft Q&A.
This is almost certainly a backend saturation event on Cosmos DB rather than a networking issue, given both private endpoint and public access paths fail. The 99.7% CPU spike right before the outage is the key signal: it typically indicates RU/s exhaustion, hot partition, or runaway query/index operation that pushed the cluster into an unhealthy state where the MongoDB gateway cannot respond within server selection timeouts. Once the gateway layer is starved, all clients see MongoServerSelectionError regardless of network correctness. Immediate actions: check metrics for normalized RU consumption, throttling (429s), and partition-level skew; review recent queries/index builds or TTL jobs; scale up RU/s or move to autoscale temporarily to recover; restart the app is useless here, but a failover (if multi-region) or backend recycle via support can help. If CPU has not dropped since, open a Sev-A ticket, this is consistent with a stuck physical partition or service-side regression rather than misconfiguration.
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.