Friday, May 8, 2015

MySql Clustering in Easy Way.

Objective:
 In this post, i will walk you through about MySQL Clustering in easy way.
Just to clear the confusion, MySQL Replication and MySQL Clustering are two different things and are having different way of implementation.

How it works :
 MySQL clustering is basically In-memory database solution which is created for high availability of MySQL Database.It is based on NDB storage engine which stores data in memory.
Note: Normally Mysql has two types of engine types.
a. Innodb
b. MyASM

but for implementation of  mysql  clustering, it has to "NDB" type. This is very important to implement clustering otherwise it will not work in clustering mode.


Components Of MySQL clustering :
 There are 3 components of MySQL clustering-
1.  Data Node
2.  Management Node
3. SQL node 

Let's discuss about all 3 components briefly.

1. Data Node : Data Node  is the node where data resides in memory.
2. Management Node : Management Node is the one which manages Data nodes and SQL nodes.
3. SQL Node :SQL Node is the one which acts as interface to interact with Data Node.