读者在 Cosmos DB 最终一致性中选择哪个副本?

发布于 2025-01-11 12:24:08 字数 279 浏览 6 评论 0原文

在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾听心声的旋律 2025-01-18 12:24:08

对于最终一致性的读取操作,可以是可用的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文