NDB Nodegroup questions
Good day,
Today I was tasked with adding Datanodes to an existing cluster. Our current setup is 4 Datanodes, Nodes 1,2 and in Nodegroup 0, Nodes 3,4 in Nodegroup 1. With NoOfReplicas=2
[ndbd(NDB)] 4 node(s)
id=1 @10.2.2.20 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 0, *)
id=2 @10.2.2.21 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 0)
id=3 @10.2.3.20 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 1)
id=4 @10.2.3.21 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 1)
[# of node groups](2) = [# of data nodes](4) / NoOfReplicas(2)
Now my understanding is that, following NDB, the Data is replicated from Nodegroup to Nodegroup, and Partitioned inside the Nodegroup.
When I added 4 Datanodes, it create Nodegroups 2 and 3:
[ndbd(NDB)] 8 node(s)
id=1 @10.2.2.20 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 0, *)
id=2 @10.2.2.21 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 0)
id=3 @10.2.3.20 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 1)
id=4 @10.2.3.21 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 1)
id=5 @10.2.2.75 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 2)
id=6 @10.2.2.118 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 2)
id=7 @10.2.3.202 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 3)
id=8 @10.2.3.198 (mysql-5.7.17 ndb-7.5.5, Nodegroup: 3)
[# of node groups](4) = [# of data nodes](8) / NoOfReplicas(2)
With the extra 2 added Nodegroups I'm now uncertain how the Replica and Partioning is handled.
If I'm wrong someone please correct me, but my understanding now is:
0 replicates with 1
2 replicates with 3
And if I lose any 1 of the 4 Nodegroups I lose the entire cluster.
Would that be correct?