Sign inSign up

zen12/rethinkdb-cluster

By zen12

•Updated over 7 years ago

A simple rethinkdb cluster setup

Image
0

2.3K

zen12/rethinkdb-cluster repository overview

⁠Docker Kafka Cluster

docker pulls docker stars

Creates a Docker⁠-based RethinkDB⁠ cluster with docker swarm⁠

⁠Get started

  1. Make it run
docker stack deploy rethinkdb-cluster -c docker-compose.yml
  1. Go into the rethink ui (http://localhost:8081⁠), add a database called 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.

⁠Default Ports

  • 29015-29019 #Listening for intracluster connections
  • 28015-28019 #Listening for client driver connections
  • 8081-8085 #Listening for administrative HTTP connections

Tag summary

Content type

Image

Digest

Size

74.4 MB

Last updated

over 7 years ago

docker pull zen12/rethinkdb-cluster