database – What is the advantage of a cluster over a single server?


Approximate data for a cluster: 1 server – Balancer application 2 servers – Server application 2 servers – Database server 1 server – Search and storage server

I don’t know the detailed difference and advantages, so I would like to ask more competent forum participants.

What can you read about this topic? Where to look?


The topic is too broad. There are many things to recommend. But corny.

You have 1 database server, for example. What if he falls? Everything is bad. First, you will lose data (at least data from the last backup). Secondly, the rest of your services will not be able to work without a base.

Now, suppose you have 3 database nodes in the cluster and replication (that is, data duplication) is configured. If 1 node fails, then the cluster will continue to work. If you have 5 nodes, then the cluster can sustain the loss of 2 nodes.

This is, if multiple. Naturally, it all depends on the architecture of the DBMS. What's good for riak isn't good for mongodb, etc. But in general, clustering helps to maintain performance even if some nodes in the system are lost.

Plus, it gives load balancing if everything is well connected to the loadbalancer.

In terms of replication in general, there are usually two models:

  • master-master . Difficult to implement option. This usually violates ACID principles. We, for example, use RethinkDB, there is just master-master. Like downside – no transactions, etc. goodies that are usually found in relational databases. In this case, all nodes can write data, this is all the problem.
  • master-slave . Easier to implement. Writes only master and pushes to slaves. You can only read from the slaves. Hence the ease of implementation. If the master fails, then usually the slaves vote on who will be the new master. If everything is successful, then the slave becomes the master, and all other slaves switch to him.

I can only recommend books in English:

Scroll to Top