3 ms·
IMO it's just confusing to call both, say, RocksDB and MySQL "databases". They sit at different levels of the stack and it is easier to just think of them as en
by lacker 4y ago
IMO it's just confusing to call both, say, RocksDB and MySQL "databases". They sit at different levels of the stack and it is easier to just think of them as entirely different things, your "SQL database" and your "storage engine". So your stack looks like
Application
|
MySQL
|
RocksDB
|
Filesystem
In general the MySQL layer is doing all the convenient stuff for application developers like supporting different queries and datatypes. The RocksDB layer is optimizing for performance metrics like throughput and reliability and just treats data as sequences of bytes.
- lcnPylGDnU4H9OF 4y agoActually, this helps a lot. I'd never heard of RocksDB and I'm barely familiar with InnoDB and hopefully I am not wrong to compare the two.
- lacker 4y agoYes, that's right, InnoDB is the default MySQL storage engine and you can replace InnoDB with RocksDB. To summarize in one sentence, InnoDB is better at reads and RocksDB is better at writes, but if you were making an actual decision you should look at more detailed information than my one-sentence summary, such as: https://minervadb.com/index.php/2018/06/06/a-friendly-comparison-of-innodb-and-myrocks-performance/ https://minervadb.com/index.php/2018/06/06/a-friendly-compar...
- deleted 4y ago[deleted]
- tomhallett 4y ago100% agreed. TIL that mysql uses RocksDB under the hood. Here's another example of a realtime database which uses RocksDB under the hood: https://rockset.com/blog/how-we-use-rocksdb-at-rockset/ https://rockset.com/blog/how-we-use-rocksdb-at-rockset/
- eatonphil 4y agoAs far as I'm aware, MySQL does not use RocksDB under the hood by default. MyRocks is a distribution of MySQL that uses RocksDB.
- moralestapia 4y agoYeah, weird comment from GP. By the time RocksDB was born, MySQL was already going to prom.
- ruw1090 4y agoClose, but in database years it was actually already in its mid life crisis.
- icelancer 4y agoOnly if you configure it that way. Same as MyISAM/InnoDB/etc.
- jeffbee 4y agoI think the use of bare RocksDB is more common than the use of MyRocks.