Database Clustering Tutorial 2 – Terminology

Have you ever been really excited working with some new software, but then got lost trying to figure out the terminology unique to it?  Well in this article, we’re going to define some terms when it comes to database clustering.

When I first started studying clustering, I was totally confused and lost.  Thankfully, some of the people at Severalnines, who made the ClusterControl software, saved the day.  But even with that help, I had to do some real digging to truly understand some terminology.

Now, when it comes to terminology, opinions vary.  People use different terms for different things.  So, I am going to give you what I think are the most widely accepted and accurate definitions.

We already discussed clusters in the previous article, but a cluster has many pieces.  You will likely hear the word node when discussing clustering. 


Nodes

A node is an individual database instance.  Put simply, it is one installation of a database.

For corporation and application use, there will likely be one installation per computer.  There are some exceptions to this though.  In a shared website hosting environment, for example, there can be many database installations on one machine. In this situation, there will be multiple nodes on a single computer.  But in general, it is one node per computer.

Types of nodes

There are two types of nodes:

  1. Master nodes
  2. Slave nodes

In a typical clustering environment, the master node is kind of like the boss node, and the slave nodes just copy the data from the master.  From an application/user perspective, the master node has read and write access, but the slaves nodes only have read access.  So, if you want to save data to the database, you have to save it to the master node.  Then that data gets copied to the slave node and can be read from there.

Topologies

In some clusters, all of the nodes are made master nodes.  This brings up the two different topologies:

  1. Master-master clusters
  2. Master-slave clusters

The primary difference between these two is that the master-master cluster allows every node to write to the database, while the master-slave cluster only allows certain nodes (the master nodes) to do this.

Conclusion

So, to review, once we install a database instance on a machine, we have a node.  If we do this with multiple computers and then connect them to each other, we will have a cluster.  This cluster will either be a master-master cluster or a master-slave cluster.

Further study

  • Study and know the differences between these terms: node, master node, slave node, master-master cluster, and master-slave cluster.
  • Research the pros and cons between a master-master cluster and a master-slave cluster.

Leave a Reply

Your email address will not be published. Required fields are marked *