Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

12/12/2017

Reading time:1 min

calvinlfer/compose-cassandra-cluster

by John Doe

README.md A docker-compose blueprint that describes a 3 node Cassandra cluster.It only exposes important Cassandra ports on the seed node to the hostmachine. Internally, all of the nodes will be a part of the same Dockernetwork and will form a cluster using that Docker network.InstructionsIn order to bring up the cluster:Use docker-compose up to see the logs of all the containersUse docker-compose up -d if you want it to run in the foregroundIn order to clean up the cluster, use docker-compose downNotesYou need to make sure that the Docker daemon has enough of resourcesotherwise you will encounter exit code 137 (Out of Memory Killer) onyour containers.When you create a single node cluster and you try to add more nodes tothe cluster, you must add them one by one. This means that you cannothave multiple nodes join the cluster (by pointing to the seed node) atthe same time. You must add a cluster, wait for it to join the ring andstabilize before you can begin to add another cluster. This is why youwill see an additional delay on start up between the non-seed nodes.If you attempt to join a new node whilst stabilization has not yet beenachieved, you will see an error like this:ERROR [main] 2017-08-22 23:19:11,055 CassandraDaemon.java:706 - Exception encountered during startupjava.lang.UnsupportedOperationException: Other bootstrapping/leaving/moving nodes detected, cannot bootstrap while cassandra.consistent.rangemovement is trueThis articlediscusses the implications of turning cassandra.consistent.rangemovementoff.CreditsThe Last Pickle

Illustration Image

README.md

A docker-compose blueprint that describes a 3 node Cassandra cluster. It only exposes important Cassandra ports on the seed node to the host machine. Internally, all of the nodes will be a part of the same Docker network and will form a cluster using that Docker network.

Instructions

In order to bring up the cluster:

  • Use docker-compose up to see the logs of all the containers
  • Use docker-compose up -d if you want it to run in the foreground

In order to clean up the cluster, use docker-compose down

Notes

You need to make sure that the Docker daemon has enough of resources otherwise you will encounter exit code 137 (Out of Memory Killer) on your containers.

When you create a single node cluster and you try to add more nodes to the cluster, you must add them one by one. This means that you cannot have multiple nodes join the cluster (by pointing to the seed node) at the same time. You must add a cluster, wait for it to join the ring and stabilize before you can begin to add another cluster. This is why you will see an additional delay on start up between the non-seed nodes. If you attempt to join a new node whilst stabilization has not yet been achieved, you will see an error like this:

ERROR [main] 2017-08-22 23:19:11,055 CassandraDaemon.java:706 - Exception encountered during startup
java.lang.UnsupportedOperationException: Other bootstrapping/leaving/moving nodes detected, cannot bootstrap while cassandra.consistent.rangemovement is true

This article discusses the implications of turning cassandra.consistent.rangemovement off.

Credits

Related Articles

python
java
cassandra

Vald

John Doe

2/11/2024

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra