Creates a Docker-based RethinkDB cluster with docker swarm
docker stack deploy rethinkdb-cluster -c docker-compose.yml
clustertest and a table called importantData. Add a document containing anything into this table.r.dbCreate('clustertest')
r.db('clustertest').tableCreate('importantData')
r.db('clustertest').table('importantData').insert({"ayyy":"lmao"})
Now you can start terrorizing the system.
Kill a rethink server:
docker service stop rethinkdb-cluster_rethinkdb2
You can kill two servers and the test app should continue working nicely. The app complains about not being able to access all servers in the cluster, but all DB operations are operational.
If you kill three servers you have less than half a cluster, so it will go offline.
Restart a rethink server:
docker service start rethinkdb-cluster_rethinkdb2
No matter how many of the server containers are down, they will all start and join the cluster.
Content type
Image
Digest
Size
74.4 MB
Last updated
over 7 years ago
docker pull zen12/rethinkdb-cluster