An Azure NoSQL database service for app development.
This usually points to inefficiencies in the requests, indexing issues, or hidden background operations. Since you’ve already filtered to query operations, the next step would be to dig into the requests and how they’re consuming RUs.
One common cause is queries that scan large amounts of data. Cosmos DB charges RUs based on the work done, not just the number of requests, so a single inefficient query can consume hundreds or thousands of RUs. You should check for queries without proper filters, missing partition keys, or using cross-partition queries unnecessarily.
To investigate further, you can look at the Query Metrics per operation. If you’re using the SDK or the portal, enable x-ms-documentdb-query-metrics for your queries. This will show you metrics such as retrieved document count, scanned document count, and RUs consumed per query. If you see that the retrievedDocumentCount is much lower than totalDocumentCount, that indicates a lot of documents are being scanned unnecessarily.
You can also use the Metrics in Azure Monitor for Cosmos DB to break down RU consumption by operation type, container, and even time windows. Look specifically at the RU per query and partition. Sometimes a single partition can get hot, causing spikes that aren’t apparent if you only look at the number of requests.
Finally, examine if there are any automated processes running around those spikes like batch jobs, change feed processors, or TTL cleanup tasks that might be executing queries inefficiently. These can run even when your normal workload is low and inflate RU usage unexpectedly.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin