Skip to main content

Using two partitions per table, which is best: even or odd numbers of nodes?

  • May 19, 2015
  • 3 replies
  • 8 views

Jack_Kidwell
Forum|alt.badge.img+1

Should clusters be 3, 5, 11, or 13 nodes, or should they be 2,4, 12, or 14?

 

Intuitively even numbers make more sense. But some think otherwise and i don't understand why. Can someone clarify?

3 replies

Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • May 20, 2015

You just need 3 to be able to have H.A.(high availability). 

Also the K-Safety level that you need 1 or 2 will dictate the number of nodes you need. 

An Even number of nodes might get the split-brain phenomenon where half the nodes go down and your cluster is unable to determine which of the nodes remaining should be the control nodes, even with this if you always have available copies of data on the remaining nodes your databas should be ok.

1,5,6,8,13,21 nodes are just numbers ! You need to have the copies of data in order for your cluster to stay online(consistent).

 


Jack_Kidwell
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • May 20, 2015

Great explanation. Odd numbers it is.


Sharon_Cutter
Forum|alt.badge.img
  • Participating Frequently
  • May 21, 2015

There's no concern about the "split-brain phenomenom" for an even number of nodes.   Up to half the nodes can go down.  Or in other words, you need half + 1 nodes up for the cluster to remain up, so that the split-brain phenomenom is not an issue.

 

From the documentation, on k-safety:

 

"Note: If half or more of the nodes in the database cluster fail, the database will automatically shut down even if all of the data in the database is technically available from replicas. This behavior prevents issues due to network partitioning."

 

  --Sharon