Request Unit in Document Db

Copper Contributor

Hello All,

Please refer to below link.

https://azure.microsoft.com/en-in/pricing/details/documentdb/

 

In Pricing Details, They have mentioned like this "Reserved RUs /second (per 100 RUs, 400 RUs minimum)". What does it means? In my application If there is no 400 RUs , let say i have 250 RUs then what will happen? Please clarify.

1 Reply

Hi,

Request Units (RUs) - "based on the amount of computation required to serve the request." "Each operation in DocumentDB - writing a document, performing a query, updating a document - consumes CPU, memory, and IOPS. That is, each operation incurs a request charge, which is expressed in request units." - Source: https://docs.microsoft.com

 

400 RUs per second - it's your reserved throughput. It means you can be sure that you can use 400 request units per second. If you have a query which requires 800RUs then you will wait 2 sec.

 

https://www.documentdb.com/capacityplanner# - Here you can estimate usage of RUs.

 

For example:

100 Read / Second = 100 RUs/s, but your application grows and in the future you would have 1000 Read / second (1000 RUs / second). So, if you set 400 RUs then all queries will have to wait ~2.5 seconds to execute because your requests use 1000 RUs per second. In this situtation, just increase throughput to 1000 RUs / second. Notice that you can change your throughput dynamically, it means up to 1000 RUs/s throughput for 1 hour and after that reduce to 400 RUs/s. But if you increase from 400RU to 1000RU for 1 sec. and back again to 400RU then you will pay for 1000RU for 1 hour. Even if for 59 min. 59 sec. you set back to 400RU.

 

I hope it helps you :)