Mysql – Scaling MySQL Cluster

mysql-clusterndbcluster

I have an NDB cluster which consists of 4 data nodes. Some of the configuration parameters and system resources as :

CPU: 32
RAM: 128GB
Replication factor: 2
Data memory: 70GB
Index memory: 10GB

I am planning to extend cluster capacity. I have two options to achieve this:

  1. I can add more RAM to data nodes so data memory and index memory will be able to double up
  2. I can add 4 data nodes more to cluster so total data memory and index memory increases too

I am not sure which one is a better solution while extending cluster capacity. If I choose first option data size stored per node will be bigger. On the other hand what about 140GB DataMemory per data node? Are there any recommended maximum value for DataMemory ve IndexMemory parameters?

Best Answer

140GB DataMemory is no problem. So the easiest change is to upgrade memory. Adding nodes increases both memory and CPU capacity. But adding nodes also changes the scalability, so could be both beneficial and negative dependent on the scalability of your application.