Docker Community Forums

Share and learn in the Docker community.

4 nodes (4 container) Cassandra cluster on 2 servers


(Moonsyim) #1

Hello
seriously I’d like to make 4 nodes Cassandra cluster on 2 servers like
1st Server : Container A, Container B
2st Server : Container C, Container D

Container A, Container C are seed node.

I’d like to make
Container A is linked (bridge) to 1st host eth0
Container B is linked (bridge) to 1st host eth1
Container C is linked (bridge) to 2nd host eth0
Container D is linked (bridge) to 2nd host eth1

but it looks like
Container A, B links to 1st node’s eth0 all.
Container C, D links to 2nd node’s eth0 all.

–net=host is not good option to me.

Do you have any good suggestion for 4 nodes Cassandra cluster on 2 servers ?


(Junius) #2

It is not recommended to deploy 4 nodes cassandra on 2 servers. If the link breaks between servers, Cassandra will hit the split brain issue.

If you could not use --net=host, it looks not possible to link container A to eth0 and container B to eth1.


(Lz333) #3

Hi Junius, I am new to docker, is it possible to have multiple cassandra rings cross multiple hosts if these hosts are really powerful (cpu/ram/disk etc)? Any suggestion how to do it? Appreciate.

https://portworx.com/run-multiple-cassandra-clusters-hosts/ . (This link showed this).


(Junius) #4

definitely, it is possible to run multiple cassandra rings on the same hosts. There are some trade-off you have to make.

If cassandra container uses the host mode for better network performance, you will have to configure different ports for different rings.

The other option is to use the overlay network. For example, you could create multiple rings on Kubernetes using StatefulSets. Kubernetes takes care of the scheduling.
If you are running on AWS, you could let Kubernetes create and assign one EBS to one cassandra container. Kubernetes will mount EBS volumes of different rings to the same hosts.