How does CosmosDb charge RUs for write operations in a multi-master enironment?

廉价感情. 提交于 2020-06-17 01:52:31

问题


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)

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.

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?


回答1:


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).

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).



来源:https://stackoverflow.com/questions/53921930/how-does-cosmosdb-charge-rus-for-write-operations-in-a-multi-master-enironment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!