gpt4 book ai didi

amazon-web-services - Amazon S3 数据一致性模型

转载 作者:行者123 更新时间:2023-12-04 08:18:57 25 4
gpt4 key购买 nike

我正在阅读文档中的 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/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com