question

WilliamBourdo-7608 avatar image
0 Votes"
WilliamBourdo-7608 asked cooldadtx answered

Is there documentation for the 'x-ms-request-duration-ms' response header value?

I have already searched through the knowledge base for this header value with no results. Specifically this article doesn't have clear documentation or a clear path to explore to find the answer https://docs.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-response-headers

I am getting this value in the last_response_headers dictionary within the CosmosClientConnection object belonging to the ContainerProxy object I'm instantiating while using the azure-cosmos python library.


azure-cosmos-db
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

cooldadtx avatar image
0 Votes"
cooldadtx answered

Looks like you're using the graph API to access Cosmos DB. Based upon the header name I suspect this is the duration (in ms) that the request took to process. This lines up with the similar x-ms-request- fields that report the "costs" of the call. This is important for servicing limits because if your request takes too long it'll fail. Returning this info tells you how long the request took. If it is getting close to the limits then you might need to do some optimizations on the queries and/or adjust your graph nodes.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.