O'Reilly logo

Learning Azure DocumentDB by Riccardo Becker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing performance

DocumentDB offers information about performance. We can use these to fine-tune our indexing policy and make the best decision on performance versus storage.

We can check the ResourceResponse class to get more information about the used RUs for a specific operation but also on other metrics. The following table outlines some of the properties of the ResourceResponse class that can be used to gather some metadata on the resource requests we perform:

Property

Description

CollectionSizeUsage

This returns the current size of a collection in kilobytes. This can be useful to detect if we are about to exceed the maximum of the collection. Based on this we can shard, scale out, or perform some other operation to prevent adding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required