cosmosDB RU吞吐量如何实施
我有一个设置为400 RU/s的cosmosGB gremlin API.如果我必须运行需要800 RU的查询,这是否意味着此查询需要2秒钟的时间来执行?如果我将吞吐量提高到1600 RU/s,此查询是否会在半秒钟内执行?通过使用RU,我看不到查询性能有任何重大变化.
I have a cosmosGB gremlin API set up with 400 RU/s. If I have to run a query that needs 800 RUs, does it mean that this query takes 2 sec to execute? If i increase the throughput to 1600 RU/s, does this query execute in half a second? I am not seeing any significant changes in query performance by playing around with the RUs.
正如我在另一个但又有些相关的答案中所解释的那样此处,将按每秒分配请求单位.如果给定的查询将花费比该一秒钟窗口中可用的请求单位数更多的费用:
As I explained in a different, but somewhat related answer here, Request Units are allocated on a per-second basis. In the event a given query will cost more than the number of Request Units available in that one-second window:
- 将执行查询
- 您现在将处于债务"状态,超出请求单位数量
- 您将一直处于节流状态,直到您的债务"付清了
假设您的速度为400 RU/秒,而您执行的查询费用为800 RU.它会完成,但随后您将负债约2秒钟(每秒400 RU,乘以2秒钟).此时,您将不再受限制.
Let's say you had 400 RU/sec, and you executed a query that cost 800 RU. It would complete, but then you'd be in debt for around 2 seconds (400 RU per second, times two seconds). At this point, you wouldn't be throttled anymore.
查询执行的速度不取决于分配的RU数量.无论您的速度为1,000 RU/秒还是100,000 RU/秒,查询都将在相同的时间内运行(除了任何限制时间之外,查询无法最初运行).因此,除了节流之外,无论RU数如何,您的800 RU查询都将持续运行.
The speed in which a query executes does not depend on the number of RU allocated. Whether you had 1,000 RU/second OR 100,000 RU/second, a query would run in the same amount of time (aside from any throttle time preventing the query from running initially). So, aside from throttling, your 800 RU query would run consistently, regardless of RU count.