CosmosDb如何为多主控环境中的写入操作收取RU费用? [英] How does CosmosDb charge RUs for write operations in a multi-master enironment?

查看:147
本文介绍了CosmosDb如何为多主控环境中的写入操作收取RU费用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有单个区域的多主数据库: SDK报告约10 RU来执行写操作
具有5个区域的多主数据库::SDK报告针对同一操作的〜46.86 RU(大约5倍,以将复制合并到所有区域.很有意义)

Multi-Master Database with single region: SDK reports ~10 RU to perform a write operation
Multi-Master Database with 5 regions:: SDK reports ~46.86 RU for the same operation (~5x to incorporate replication to all regions. Makes sense)

如果您有以10k RU分配的集合,那么cosmos是否为每个区域都提供了10k RU的分配?微软文档会建议这样做,但随后SDK会在如上所述写入本地区域时报告所有区域成本,这似乎有些奇怪/令人困惑?此外,为了将写入内容复制到这些区域中,我在其他区域中看不到任何其他写入活动.

If you have a collection provisioned at 10k RU, does cosmos provision 10k RU for every region? The microsoft docs would suggest so but then the SDK reports all region cost when writing to the local region as above which seems a bit odd / confusing? Additionally, I don't see any other write activity in the other regions in order to replicate writes into those regions.

问题:您是在本地写入区域中支付46RU的费用,还是SDK所报告的费用实际上除以每个区域要支付费用的区域数?那么在上述具有五个区域的情况下,每个区域的写入操作费用为10RU还是一次写入的费用约为47 RU?

Question: Do you pay the cost of 46RU in your local write region or is the cost reported by the SDK essentially divided by the number of regions you have with each region paying the cost? So in the above scenario with five regions does that write operation cost 10RU in each region or a once off charge of ~47 RU in the local write region?

推荐答案

每个区域都会获得指定的RU分配,因此,如果创建一个10K RU集合,并且在多主环境中有5个区域,那么您将拥有10K x 5 = 50K RU可用(并支付50K RU).

Each region gets the specified allocation of RU, so if you create a 10K RU collection, and have 5 regions in your multi-master environment, you will have 10K x 5 = 50K RU available to you (and paying for 50K RU).

每个操作都有其自己的RU费用,因此,如果在所有5个区域中都进行写操作,那么您将消耗每个区域中的RU(这不会导致单个区域中RU成本增加5倍).有利的是,在一个区域中的写入不会影响另一区域中的可用RU.但是,您需要为每个区域的RU容量付费(实际上是您指定的区域数的乘数).

Each operation has its own RU charge, so if a write takes place in all 5 regions, then you are going to consume the RU in each region (it does not result in 5x the RU cost in a single region). The upside is that writes in one region don't affect available RU in another region. However, you will be paying for RU capacity in each region (effectively a multiplier, for the number of regions you specify).

这篇关于CosmosDb如何为多主控环境中的写入操作收取RU费用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆