DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

Sergio avatar image
Sergio asked ·

Racks - Datacenter Node Load Balancing

Hello guys! I was reading about https://cassandra.apache.org/doc/latest/architecture/dynamo.html#networktopologystrategy I would like to understand a concept related to the node load balancing. I found a cluster with vnodes = 256 replication factor = 3 and 2 racks. This is unbalanced because the racks are not a multiplier of the replication factor. However, my plan is to move all the nodes in a single rack to eventually scale up and down the node in the cluster once at the time. If I had 3 racks and I would like to keep the things balanced I should scale up 3 nodes at the time one for each rack.

If I would have 3 racks, should I have also 3 different datacenters so one datacenter for each rack? Can I have 2 datacenters and 3 racks?

If this is possible one datacenter would have more nodes than the others? Could it be a problem?

I am thinking to split my cluster in one datacenter for reads and one for writes and keep all the nodes in the same rack so I can scale up once node at the time.
Please correct me if I am wrong
Thanks, Sergio

datacenterload balancingracks
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Lewisr650 avatar image
Lewisr650 answered ·

It's likely that you don't want or need 3 datacenters to support 3 racks. However, the 3 racks being aligned to the replicas is a correct assessment. The concept is that you want to avoid any single point of failure, including hardware failures within each rack. (Power, switch, cooling, etc.) With that, you want to be certain that Cassandra is distributing data across racks. Therefore, if a rack goes down you still have full availability of your data that sits in the other 2 racks and you can validate consistency of that data since you have 2 available replicas. The datacenter question is typically centered around 2 considerations: 1) Regional data replication (East Coast vs. West Coast) and 2) Workload Isolation (Persistence only, Analytics, Search, Graph) You would be complicating your application by distributing that data across DCs in this scenario. (Based on the few details provided.)

The question about one DC having more nodes than another depends on the amount of data being replicated between the DCs. If it's 100% data replication between the 2 DCs and you have fewer nodes in one DC than the other, you'll run into a problem where one DC won't be able to keep up with the other DC. You need to have the same "horsepower" in both DCs to maintain the data and saturation of IO required to support the data. However, if you have one DC with 100% of the data and anther DC with half the nodes but only supporting 50% of the data then you "might be ok". It really requires additional discussion to guide you to the correct architecture.


The details you provide deserve additional discussion, but you have not made all the correct assumptions in this scenario.

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

DCs = Datacenters
RF = Replication Factor
Datacenters are in the same regions but different subregions.
My plan is to have one DC in us-east-1a and another DC in us-east-1b.
Both DCs with one rack and keyspace with RF = 3 for both DCs .
This is what I understood from https://community.datastax.com/answers/1120/view.html

0 Likes 0 · ·