vivek garg
vivek garg

Reputation: 283

Is S3 Object's Metadata strongly consistent

S3 Objects have eventual consistency for overwrites PUTS and DELETES as mentioned here - http://aws.amazon.com/s3/faqs/#What_data_consistency_model_does_Amazon_S3_employ

Is this applicable for both S3 Object and metadata or Object's metadata is read after write consistent?

Upvotes: 1

Views: 1648

Answers (3)

Dzmitry Lazerka
Dzmitry Lazerka

Reputation: 1925

No, not always. Just as with object data, object metadata sometimes is eventually consistent, not strongly consistent.

Remainder of answer copied from Quick Explanation Of The S3 Consistency Model
    -- codeburst.io blog post 2018-02-10

Documentation says:

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.

Note "the caveat".

It means you can observe the following sequence of events:

GET /key-prefix/cool-file.jpg 404
PUT /key-prefix/cool-file.jpg 200
GET /key-prefix/cool-file.jpg 404

or this one:

PUT /key-prefix/cool-file.jpg 200
PUT /key-prefix/cool-file.jpg 200 (new content)
GET /key-prefix/cool-file.jpg 200 (old content returned)

which is not strongly consistent.

Upvotes: 0

Alireza
Alireza

Reputation: 10476

From http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html :

"Objects are the fundamental entities stored in Amazon S3. Objects consist of object data and metadata. The data portion is opaque to Amazon S3. "

As consistency model is about objects (and not objects data) so yes metadata complies with the model as well.

Upvotes: 0

Shekhar Gupta
Shekhar Gupta

Reputation: 36

Both S3 object (or data) and metadata follow same consistency model.

Upvotes: 2

Related Questions