写入 Amazon S3 是原子的(全有或全无)吗? [英] Are writes to Amazon S3 atomic (all-or-nothing)?

查看:16
本文介绍了写入 Amazon S3 是原子的(全有或全无)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有大量文件正在读取和写入 S3.我只是想知道是否需要为文件写一半"的情况编码,例如S3 PUT/只写一半"有效.

I have a large number of files that I am reading and writing to S3. I am just wondering if I need to code for the case where a file is "half written" e.g. the S3 PUT / Write only "half" worked.

还是写入 S3 全有或全无?

Or are writes to S3 all-or-nothing?

我知道存在读写最终一致性问题,(我认为)在很大程度上是一个单独的问题.

I know there is a read-write eventual consistency issue which (I think) is largely a separate issue.

推荐答案

对于所有区域除了美国标准 (us-east-1),您都获得了先读后写一致性.这意味着如果您的 PUT 得到 HTTP 200 OK,您可以立即读取该对象.

For all regions except US Standard (us-east-1) you get read-after-write-consistency. This means that if you get an HTTP 200 OK for your PUT, you can read the object right away.

如果您的请求在中间被丢弃,您将不会得到 HTTP 200 并且您的对象根本不会被写入.

If your request is dropped in the middle, you would not get and HTTP 200 and your object would not be written at all.

更新:现在所有区域都支持写后读一致性(感谢@jeff-loughridge):https://aws.amazon.com/about-aws/whats-new/2015/08/amazon-s3-introduces-new-usability-enhancements/

UPDATE: All regions now support read-after-write consistency (thanks @jeff-loughridge): https://aws.amazon.com/about-aws/whats-new/2015/08/amazon-s3-introduces-new-usability-enhancements/

这篇关于写入 Amazon S3 是原子的(全有或全无)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆