读者在 Cosmos DB 最终一致性中选择哪个副本?
在cosmos DB中,一个副本集由4个副本组成。 它有 1 个领导者和 3 个追随者(包括转发器)。
我假设所有更新首先经过领导者并且 当有更新时,leader 是第一个被更新的 在副本集中。
如果我的假设是正确的,读者就不必阅读 许多复制品。它只需要检查每个副本集中的领导者即可找出最新更新。
例如,Cosmos DB 文档表示,如果 在最终和一致的前缀一致性模型中,仲裁读取正在访问一个副本。据我了解,单个副本可以是一个区域中的任何副本。但是,如果读者需要从副本读取更新,它是否必须是领导者副本?
In cosmos DB, one replica-set consists of 4 replicas.
It has one leader and 3 followers (including a forwarder).
I assume that all updates go through the leader first and
the leader is the first one to be updated when updates come
in the replica-set.
If my assumption is correct, a reader does not have to read
many replicas. It only needs to check the leaders in each replica-set to figure out latest updates.
For example, Cosmos DB documentation says that in case of
eventual and consistent prefix consistency models, quorum reads is accessing one single replica. As far as I understand it, the single replica can be any replica in a region. But, if a reader needs to read a update from a replica, does it have to be a leader replica?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于最终一致性的读取操作,可以是可用的 4 个副本中的任何一个,因此读取将落在其中任何一个副本上,而不是特别是领导者。
For read operations on Eventual consistency, it can be any of the 4 replicas that are available, so the read will land on any of them, not particularly the leader.