can a node differ from other nodes in the ring or cluster in terms of CPU ,memory, diskspace, processor etc?
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
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.
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
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
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!
@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
5 People are following this question.