by rad_gruchalski · 1y ago · 0 comments
GCS, unfortunately, does not support copying a range. OTOH, it has long supported object append through composition.
The challenge with both offerings is that writes to a single object, and writes clustered around a prefix, are seriously rate limited, and consistency properties mostly apply to single objects.
GCS 32 objects, and Azure blob storage, afair 5k objects. Both can do an operation similar to what you described for S3 with various alternatives of read at offset + length and rolling those up.
In all cases, you end up always rolling up into a new key that isn’t available for read until roll up is done. It’s kinda useless for heavy write scenario.
Compare that to your normal fs operation. Write at offset to an existing file with size smaller that offset will just truncate the file to the offset, and continue writing.
You create a multi-part with 3 chunks: the 1st part is a copy range of the prefix, the 2nd part the bit you want to change, and the 3rd a copy range of the suffix?
And yes, all of this is useless for heavy (and esp. concurrent) writes.
Downside is the 250ms latency. But then again, a fair amount of workloads can deal with 250ms of latency.
tmp/uploads/object-0, tmp/uploads/object-1024, tmp/uploads/object-2048
would be a rolled up object of size 2048MB + whatever is in the object-2048 file.