I am reading the Amazon S3 data consistency from the docs 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.
I understand that Amazon S3 provides read after write consistency while putting new objects to S3 bucket. But I didn't quite get that caveat for HEAD and GET request before creating the object, what does that mean?
The actual internals of S3 are proprietary to AWS, but here's a theory:
When you request an object, it goes to its cache to see if it's there.
This is the read-after-write consistency. You'll get the new version immediately.
This is the eventual consistency for read-after-write for updates. You update the object, and then the cached version must expire before you get the new version.
This is the behaviour you're asking about. Like the old data being in the cache, S3 has cached "the key does not exist" as the "old data". So again, you must wait for the cache to expire before the actual data can be returned.
Again, this is not stated with any authority. I'd welcome any S3 experts to correct or dispute any errors I may have.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With