Live data from Hacker News

Diving Deep on S3 Consistency

allthingsdistributed.com

51–55 of 55 posts

Re: Diving Deep on S3 Consistency

#51
post #24

Here's what I take away from this post: > We built automation that can respond rapidly to load concentration and individual server failure. Because the consistency witness tracks minimal state and only in-memory, we are able to replace them quickly without waiting for lengthy state transfers. So this means that the "system" that contains the witness(es) is a single point of truth and failure (otherwise we would lose…

They've basically bolted on causal consistency. It's a great change.

Thank you for dropping the "causal consistency" term. I read the wikipedia article.

So, causal consistency in this context means that 1) it does not matter if a write to object A or object B came first, because they are seen as "unrelated". This obviously allows for performance improvements over general "strong consistency" but still offers more guarantees than eventual consistency.

Second, for every "writer" (which would be a 1:1 relationship to the number of S3 objects) an amount of metadata needs to be kept in-memory for such cases where the access to an object _might_ lead to an outdated read or where an "older" write would potentially overwrite a "newer" write.

All that being said, there still is one single instance that, if it goes down, makes the whole system unavailable for the S3 objects it manages until it is replaced. So that means a lower availability compared to a solution that uses eventual consistency (like Cassandra).

Would this be equivalent to having an in-memory SQL database to store the metadata for some other system (such Cassandra) with a quick failover but still single point of failure to enhance the consistency guarantees - just more optimized/customized so that it can work with a huge system like S3?

Re: Diving Deep on S3 Consistency

#52
post #43

Earlier quoted context omitted.

S3 (and most AWS services) are extremely price elastic; i.e., the lower you make them cost, the more people use it (a la electricity.) That's why they've done stuff like drop from 50ms billing to 1ms billing, etc.

They could still offer it as a client library feature, just tell the users what kind of r/w amplification and guarantees they can expect, and it's something they could optimize later or not.

You can't reliably implement conditional PUTs in the client, you need a server side mechanism like the `if-match` header.

Re: Diving Deep on S3 Consistency

#53
post #39

Earlier quoted context omitted.

There is a conditional CopyObject though (x-amz-copy-source-if...) Can cover some of the use cases

Can you explain how this is useful? It seems like the destination is the important thing here not the source.

it can be useful for some coordination problems.

for example imagine that you have N writers and you want only the first of them to write something in a n object.

each writer writes their content into "_foo" and each tries to copy that to "foo", with "x-amz-copy-source-if-match". Only one of them will succeed and "foo" will have one consistent value, which all observers (including other writers) can agree who has won.

Re: Diving Deep on S3 Consistency

#54
post #43

Earlier quoted context omitted.

They could still offer it as a client library feature, just tell the users what kind of r/w amplification and guarantees they can expect, and it's something they could optimize later or not.

You can't reliably implement conditional PUTs in the client, you need a server side mechanism like the `if-match` header.

Conditional PUTs aren't possible with versioned objects, but if you desire immutability, then they do help.

To implement serialisation, (as opposed to using Conditional PUTs) one could implement a ledger on top of versioned buckets with LegalHolds: Basically, the object versions part of the main chain are LegalHolded whilst other versions are reconcilled (rebased) onto main and later deleted. Tricky to implement, for sure, compared to say, maintaining a journal in DynamoDB to track PUTs to maintain serial integrity.

Re: Diving Deep on S3 Consistency

#55

Earlier quoted context omitted.

How do versioned objects make conditional puts unnecessary? I see little relation between them, except that you could use the version identifier in the condition.

Because they let AWS offload the hard part to you, which is what AWS does best :)

[deleted]
Post reply on HN