secondary indices, link traversal, commit hooks, HTTP and binary interfaces, pluggable backends Written in Erlang and C/C++ Open Source, Apache 2 licensed Enterprise features (multi-datacenter replication) and support available from Basho Tuesday, June 5, 12
DBs trade off traditional features to better support new and emerging use cases Knowledge of the underlying system is essential A lot of NoSQL marketing is bullshit Tuesday, June 5, 12
Cassandra, you don’t understand your problem By choosing Riak, you’ve already made tradeoffs: Consistency for availability in failure scenarios A rich data/query model for a simple, scalable one A mature technology for a young one Tuesday, June 5, 12
“the master node went down” “the failover script did not run as expected...” “the root cause was traced to a configuration error...” Staying up all night fighting your database does not make you a hero. Tuesday, June 5, 12
manages many vnodes Riak *could* manage all host-local storage as a unit and gain efficiency, but would lose simplicity in cluster resizing failure isolation Tuesday, June 5, 12
provides crash-safety, fast writes Tradeoff: must periodically compact/merge files to reclaim space Causes periodic pauses while compaction occurs that must be masked/mitigated Tuesday, June 5, 12
”keydir” is updated. A keydir is simply a hash table that maps every key in a Bitcask to a fixed-size structure giving the file, offset, and size of the most recently written entry for that key. When a write occurs, the keydir is atomically updated with the location of the newest data. The old data is still present on disk, but any new reads will use the latest version available in the keydir. As we’ll see later, the merge process will eventually remove the old value. Reading a value is simple, and doesn’t ever require more than a single disk seek. We look up the key in our keydir, and from there we read the data using the file id, position, and size that are returned from that lookup. In many cases, the operating system’s filesystem read-ahead cache makes this a much faster operation than would be otherwise expected. Tradeoff: Index must fit in memory Low Latency: All reads = hash lookup + 1 seek All writes = append to file Tuesday, June 5, 12
Bad for microbenchmarks, good for production use, durability Mongo ships with W=0 Good for benchmarks, horrible and insane for durability, production use. Tuesday, June 5, 12
Failure scenarios ...is essential for managing operational costs When choosing a database, raw throughput is often the least important metric. Tuesday, June 5, 12