我正在阅读文档中的 Amazon S3 数据一致性 http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html
Amazon S3 provides read-after-write consistency for PUTS of new objects in your S3 bucket in all regions with one caveat. The caveat is that if you make a HEAD or GET request to the key name (to find if the object exists) before creating the object, Amazon S3 provides eventual consistency for read-after-write.
我知道 Amazon S3 在将新对象放入 S3 存储桶时提供了读写一致性。但是在创建对象之前,我并没有完全理解 HEAD 和 GET 请求的警告,这是什么意思?
最佳答案
S3 的实际内部结构是 AWS 专有的,但这里有一个理论:
当您请求一个对象时,它会进入它的缓存以查看它是否在那里。
这就是写后读一致性。您将立即获得新版本。
这是 写后读的最终一致性更新 .您更新对象,然后缓存版本必须在您获得新版本之前过期。
这就是你要问的行为。就像缓存中的旧数据一样,S3 将“ key 不存在”缓存为“旧数据”。因此,您必须等待缓存过期才能返回实际数据。
同样,这不是以任何权威声明的。我欢迎任何 S3 专家纠正或质疑我可能遇到的任何错误。
关于amazon-web-services - Amazon S3 数据一致性模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47312459/