question

biswa333_125242 avatar image
biswa333_125242 asked Erick Ramirez edited

Is it possible to deploy nodes in a cluster with differing hardware configuration?

can a node differ from other nodes in the ring or cluster in terms of CPU ,memory, diskspace, processor etc?

cassandravirtual nodeshardware
10 |1000

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

Erick Ramirez avatar image
Erick Ramirez answered

Yes, it is technically possible to have nodes with heterogeneous hardware configuration in the cluster. The keyword being "technically" -- there's nothing in the code that will prevent you from adding nodes with different hardware.

However operationally we don't recommend doing this because it would make it difficult for operators to identify problematic nodes or intermittent issues. If the hardware is not identical, the performance of each query will vary and will not be easy to support.

We do understand that there are some situations where you really don't have a choice. For example, you need to add nodes to an existing cluster but the specific server model is no longer available. The best way to deal with this kind of situation is to manually "adjust the load" assigned to the nodes.

EXAMPLE 1 - Virtual nodes

As a general rule, we recommend assigning 8 tokens to each node. Let's say the existing nodes have 8 cores and 64GB RAM with num_tokens: 8.

In contrast, the new nodes have double the hardware capacity with 16 cores and 128GB of RAM.

In this scenario, we recommend allocating twice the load to the new nodes by assigning twice as many tokens in cassandra.yaml:

num_tokens: 16

EXAMPLE 2 - Single-token clusters

For clusters that don't use vnodes, it is possible to have a mixed-hardware configuration by adjusting the initial_token assigned to each node.

By "adjusting" I mean re-calculating the token ranges so that the new nodes own token ranges twice as large as the existing nodes. For example, if the existing nodes own a range of 1000 tokens then the new nodes should own a range of 2000 tokens.

For more info, see Virtual nodes. Cheers!

Share
10 |1000

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

saravanan.chinnachamy_185977 avatar image
saravanan.chinnachamy_185977 answered saravanan.chinnachamy_185977 edited

@biswa333_125242Though it is possible to operate a cluster with different node configurations within a data center, it is advisable to use the same hardware for a given datacenter. We can have different hardware spec between data centers and they are perfectly ok.

If we add nodes with different hardware spec within the DC, it will create issues, particularly if you're using consistency level higher than LOCAL_ONE or ONE.The latencies when reading or writing data will be different, and even if the new nodes answers fast, the smaller nodes will dely the response.

Please refer to our documentation for more information on this topic at Hardware selection

Share
10 |1000

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