Hacker News new | ask | show | jobs
by ddorian43 948 days ago
> I'm talking about the entire DB as s3.

Yes, it can be done, except for WAL append & COLD GET. You "just" have to re-architect everything in the storage layer.

Do you have anything specific in mind besides the 2 things I mentioned?

1 comments

You haven't given specific of this to be blunt no idea what you mean.

I already said my points about the problems your follow-up comments have not addressed those.

Also there is no such thing in s3 as a cold GET there is a cold startup for a lambda. The latency from s3 on a get is orders of magnitude poorer that EBS or LSSD and should be used "infrequently".

Imagine using rocksdb backed by S3. You store only sstables in S3. You append the WAL in EBS and archive it in S3. You cache blocks in local SSD. If you want faster WAL, you append the WAL in local-ssd and use multi-az replication in your db and fsync WAL to EBS less frequently than locally.

> What about transactionality, partial updates, running multi document queries, consistency of the whole set of documents.

You do that in another layer on top. The filesystem doesn't provide transactions, yet you do them on a layer on top.

> In terms of scalability there are, limits 3500rps per key prefix.

The S3 metadata is (was?) sharded on key-prefix. You fix this by using more prefixes. By hashing the filenames or something.

> The latency from s3 on a get is orders of magnitude poorer that EBS or LSSD and should be used "infrequently".

Yes, it is. You should use a local SSD for most things.

This is basically how Fireproof works: files to S3, reads from any cache, encryption metadata in your session store. All of this becomes “easy” if you write a storage engine from scratch for immutable content addressed data.