Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does read-after-write consistency really mean on new object PUT in S3?

Amazon documentation (http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel) states:

"Amazon S3 provides read-after-write consistency for PUTS of new objects in your S3 bucket in all regions with one caveat."

Ignoring the caveat, this means that a client issuing a GET following a PUT for a new object is guaranteed to get the correct result. My question is, would the guarantee also apply if the GET is issued from a different client not the one which did the PUT (assuming of course the GET follows the PUT chronologically)? In other words, is read-after-write consistency simply read-your-write consistency or it works for all clients?

I suspect the answer is that it works globally but can't find a definitive answer.

like image 344
Alf Avatar asked Mar 22 '17 16:03

Alf


People also ask

What is S3 read-after-write consistency?

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.

What is read-after-write consistency?

Read-after-write consistency is the ability to view changes (read data) right after making those changes (write data). For example, if you have a user profile and you change your bio on the profile, you should see the updated bio if you refresh the page. There should be no delay during which the old bio shows up.

What consistency is assured for read write of objects in a S3 bucket?

Amazon S3 delivers strong read-after-write consistency automatically for all applications, without changes to performance or availability, without sacrificing regional isolation for applications, and at no additional cost.

Does S3 provide read-after-write consistency for all regions?

Amazon S3 now delivers strong read-after-write consistency automatically for all applications.


2 Answers

Yes, it would be consistent.

The concept of a 'client' is irrelevant because each API call is independent.

The us-east-1 region (previously known as US-Standard) previously did not have read-after-write consistency, but it is now provided in all regions.

like image 151
John Rotenstein Avatar answered Sep 29 '22 10:09

John Rotenstein


I've always assumed that same you, i.e. that read-after-write applies to all clients, not just the client that did the write.

This blog post seems to confirm it (for what its worth), but I also did not find any definitive answer on official AWS docs:

https://shlomoswidler.com/2009/12/read-after-write-consistency-in-amazon.html

What is Read-After-Write Consistency?

Read-after-write consistency tightens things up a bit, guaranteeing immediate visibility of new data to all clients. With read-after-write consistency, a newly created object or file or table row will immediately be visible, without any delays.

like image 34
E.J. Brennan Avatar answered Sep 29 '22 09:09

E.J. Brennan