need to know: • Written in Erlang/OTP • distributed, key/value store + extras • advanced query features • pre/post commit hooks • pluggable backend storage engines • open source (Apache v2.0)
Consistent Hashing • 160-bit integer keyspace • divided into !xed number of evenly-sized partitions • partitions are claimed by nodes in the cluster • replicas go to the N partitions following the key node 0 node 1 node 2 node 3
Consistent Hashing • 160-bit integer keyspace • divided into !xed number of evenly-sized partitions • partitions are claimed by nodes in the cluster • replicas go to the N partitions following the key node 0 node 1 node 2 node 3 hash(“meetups/nycdevops”) N=3
Disaster Scenario • node fails • requests go to fallback • node comes back • “Hando"” - data returns to recovered node • normal operations resume hash(“meetups/nycdevops”)
DevOps - Internal • mix of programming and utilities • automate all the things! • instrumental in improving Riak Test Suite • 1,000s of separate tests • various con!gs / platforms
Chef Cookbooks • open source: • $ git clone [email protected]:basho/riak-chef-cookbook.git • over 30 commits in 2012 • deploy riak • future: • simplify use • rolling upgrades, autocon!g, iptables
Erlang Template Helper • also open source: • $ git clone [email protected]:basho/erlang_template_helper.git • written by Dan Reverri • specify Erlang con!g and args !les in JSON
Testing repl at Scale • full-sync repl • bottleneck in how keys were being read • lexicographical vs disk-ordered • used the Boston datacenter to prototype !x • currently in review to be merged into Riak EE
Realtime repl Throuput • provisioned 5 machines • constrained bandwidth and increase latency between clusters • but not among nodes in the same cluster (‘management’ network as WAN approx) • discovered + eliminated several bottlenecks • customer achieved 10x jump in performance
“In both cases I was unable to replicate these issues on the hardware available to me locally, both through limited machines (2) and major performance di!erences between nodes ("rst gen mbp vs i7 dell tower)” --Andrew Thompson, Basho Engineer
Riak CS Large Object Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak Node Riak Node Riak Node Riak Node Riak Node
Riak CS Large Object Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak Node Riak Node Riak Node Riak Node Riak Node
Riak CS Large Object Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak Node Riak Node Riak Node Riak Node Riak Node 1mb 1mb 1mb 1mb
Riak CS Large Object Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak Node Riak Node Riak Node Riak Node Riak Node 1mb 1mb 1mb 1mb
Riak CS Large Object Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak CS Reporting API S3 API Riak Node Riak Node Riak Node Riak Node Riak Node 1mb 1mb 1mb 1mb
shameless plugs: • Basho is Hiring DevOps Engineers: • work remotely • hack on cool shit • help make Basho and Riak better • send CV to Sean Carey [email protected]