What is RethinkDB? • Open source database for building realtime web applications • NoSQL database that stores schemaless JSON documents • Distributed database that is easy to scale
Automatic Failover • In RethinkDB, automatic failover takes care of promoting secondary replicas into primary replicas when a primary replica is unavailable • The cluster picks new primaries by voting. New server need a majority vote.
Step #5: Insert test data // Insert data into table r.table('data') .insert( // Insert data form Reddit r.http('reddit.com/r/rethinkdb.json') ('data')('children').map(r.row('data')) ) // Query data r.table('data')
What happened? • We move all our data in 'redisgeek' • We disconnected 'redisgeek' from the network • Because we can't communicate with 'redisgeek' (primary replica), our data in inaccessible