news.volyx.in

Amazon S3 Adds Put-If-Match (Compare-and-Swap) (aws.amazon.com)

524 points by Sirupsen · 619 days ago · 160 comments on HN

Article summary

Amazon S3 has added a new feature for conditional writes, allowing clients to update objects only if they have not been modified since the last read. This is achieved by providing the ETag of the object in the API request, which is then evaluated by S3 before committing the write. This feature simplifies coordination of simultaneous writes to the same object and prevents unintentional overwrites. The feature is available at no additional charge in all AWS Regions.

Main themes

  • Conditional writes
  • Object storage
  • Concurrent updates
  • Cloud computing
  • Data consistency
  • AWS S3

What commenters say

  • The new feature is a significant improvement for distributed applications with multiple clients updating shared datasets.
  • The feature is similar to what is already available in Google Cloud Storage and Azure Storage, and its absence in S3 was a notable gap.
  • The use of MD5 hashes for ETags may be vulnerable to collisions, which could potentially be exploited by malicious actors.
  • The feature is not a security mechanism, but rather a way to prevent unintentional overwrites, and should not be relied upon for security purposes.
  • The implementation of conditional writes in S3 may have implications for the CAP theorem, potentially trading off availability for consistency.
  • The feature may enable new use cases, such as building incremental append-only storage atop an object store.
  • The default ETag algorithm used by S3 may not be suitable for all use cases, and alternative algorithms like SHA256 may be preferred.
  • The feature is a testament to the complexity and capacity required to implement simple-sounding features in a cloud storage system.