Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think he's making a fair point. If the result of a write is that data is stored only in memory on a single machine, and is not written to a more-durable place as a blocking part of the write operation, then I would consider this data store a cache. Because at the point when my application returns from the operation to store the data, the data can still be lost due to a number of common failure scenarios.

If the data is replicated across a number of machines, then determining the durably is a more complex task. If sending data to the cluster blocks the user's write on a response from the quorum of the cluster, then I think the cluster can be considered reliable data store, even if the cluster nodes don't necessarily write to disk immediately or at all. Perhaps they keep the data in memory forever, and there are enough replicas that the chance of data loss (through all replicas being down at once) is low enough to accept. (It's conceptually similar to replicating across many disks and losing all the disks at once, although I agree, it seems intuitively a lot more fragile than disk based replication)

A more realistic model might be in-memory replication by quorum followed by buffered writes to disk on all replicas too. Since there are many replicas, it's not unreasonable to "persist" data in RAM on the many repliacs, but we also get the full benefits of disk persistence after a short time.

Just thinking out loud here.



You're right that memSQL absoutely crawls when it is set to "fully-durable" mode where it has to sync write to the disk. But it was never built for the use-case, and I guess that's missing the point.

memSQL, AFAIK, was built for highly concurrent reads and writes. It uses lock-free in-memory data structures, couple that with an eventually-durable mode, in addition to optimizing queries by the way of re-compiling SQL to CPP (something similar to what HHVM does for PHP), I think it would result in performance gains in certain (and not all) use-cases.

memSQL, if we dare simplify, is really a high-throughput cache front-ending an eventually-durable datastore.

I wonder how would RocksDB + a disk-backed DB measure upto memSQL.

Ref: http://dom.as/2012/06/26/memsql-rage/


Excuse me, does eventually-durable means some time yes, some time no?)

To put in another way - does any bank would accept eventually-durable as its financial transaction storage?

More seriously, without error propagation to the client, such that it could "know immediately" which one of his transactions failed, there is no durability at all.

Ask all these telecom guys - without immediately returned ASK packets and timeouts a protocol cannot be called "reliable".


I don't work for MemSQL. I know what I know from various posts on Quora, and the MemSQL engg blog itself. So take everything I say with a grain of salt.

MemSQL has two modes (if I am right): synchronous and asynchronous. I believe, if you're a bank, you'd want the first one. But if high throughput is your priority, you can afford to sacrifice durability for that, I think MemSQL would be an extremely fast solution compared with other disk-first datastores.

One thing that memory-first datastores (MemSQL, VoltDB) would be really good at is lots of reads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: