amazon-web-services - 您如何在分布式系统中编程强大的写后读一致性?

标签 amazon-web-services amazon-s3 distributed-system cap-theorem

最近,S3 announces strong read-after-write consistency。我很好奇如何编程。它不是违反CAP定理吗?
在我看来,最简单的方法是等待复制发生然后返回,但这会导致性能下降。
AWS表示没有性能差异。如何实现的?
另一个想法是,亚马逊有一个巨大的索引表,可以跟踪所有S3对象及其存储位置(我相信三重复制)。并且它将需要在每个PUT/DELTE处更新此索引。在技​​术上可行吗?

最佳答案

如上面的Martin所示,有一个指向Reddit的链接,其中讨论了this。来自u/ryeguy的最高答复给出了以下答案:

If I had to guess, s3 synchronously writes to a cluster of storage nodes before returning success, and then asynchronously replicates it to other nodes for stronger durability and availability. There used to be a risk of reading from a node that didn't receive a file's change yet, which could give you an outdated file. Now they added logic so the lookup router is aware of how far an update is propagated and can avoid routing reads to stale replicas.

I just pulled all this out of my ass and have no idea how s3 is actually architected behind the scenes, but given the durability and availability guarantees and the fact that this change doesn't lower them, it must be something along these lines.


欢迎提供更好的答案。

关于amazon-web-services - 您如何在分布式系统中编程强大的写后读一致性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65328318/

相关文章:

java - 从 gRPC 服务中调用时 gRPC 客户端不工作

distributed - 分布式系统中的投票协议(protocol)

ssl - 如何在 Cloudfront 中使用 Amazon ACM 证书?

time - 确定到期 - 分布式节点 - 无需同步时钟

node.js - 如何以编程方式将aws凭证和配置传递给nodejs中的aws sdk?

amazon-ec2 - 如何设置和提供类似失败鲸鱼的服务器过载页面?

mysql - Slave 没有将任何数据写入 mysql master slave 复制中的表

ios - AWS iOS Swift 3 Cognito 类型不符合协议(protocol)

amazon-s3 - S3_delete_objects_operator 不删除bucket中的文件

sql - 是否有将数据从雪花获取到 s3 的最佳方法