Hacker News new | ask | show | jobs
by ddorian43 945 days ago
> You have to rewrite a whole DBMS on top of s3 itself or use redshift to get these things.

No, you get a DBMS and only change the storage underneath. You can't use S3 for appending to WAL though.

All those can be fixed besides the latency for a cold GET from S3 and appending WAL to S3.

2 comments

> No, you get a DBMS and only change the storage underneath

I think what you mean is what we have implemented a side channel DBMS which holds a copy which you use for the transactionality. It's a terrible approach I would not do this at all you don't get any benefit from using s3 here.

This is not to say you can't use s3 to pull large blob storage off the DB and reference it in the DB I'm talking about the entire DB as s3.

> 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?

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.
You defintiely can use S3 for appending to a WAL (I've done it), they have read-after-write consistency
You're doing it for large OLAP writes. But as soon as you do OLTP or small writes it will become very slow & expensive.

See warpstream as example https://news.ycombinator.com/item?id=37036291

How about using Kafka for the WAL? Anybody tried that?
LogDevice or apache bookeeper is better for distributed log.