What's the underlying reason that object storage can not support edit/update/append file?

252 Views Asked by At

I know object is immutable and its content could not be edited, but I'm curious about why.

Is it because S3 use RESTful API and PUT doesn't support partial write? But why not just transfer the data of the updated blocks and update the file by S3 backend server? Or implement the HTTP PATCH method?

By the way, when playing video (.mp4) that store on S3, it seems it can support random read because I can do jump in the progress bar instantly without waiting, I'm not sure wheter the S3 client I use (RaiDrive) has local cache or S3 itself support random playing video.

1

There are 1 best solutions below

0
On

It has nothing to do with a patch request. A patch request just means the method verb string is patch. Someone still has to provide the ability to do what you are asking for.

The main reason is that by making it immutable entirely makes the ability to provide distributed, replicated, versioned, scalabale, and highly available storage system like s3 a bit easier.

If it were mutable - it would make building a system like s3 a lot more difficult.

Many distributed storage systems move to immutability to make it easier to architect and design. Even google file system only allows appending which is why they use level db to support workloads instead of btree type dbs that require writing to the middle of files