Example cluster data: 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 learn from more competent forum participants.

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

    1 answer 1

    The topic is too extensive. A lot of things you can advise. But trite.

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

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

    This, if multiple. Naturally, it all depends on the DBMS architecture. What is good for riak is not good for mongodb, etc. But in general, clustering helps to maintain performance even with the loss of some nodes in the system.

    Plus, it gives a load distribution, if you link everything well with loadbalancer.

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

    • master-master . Difficult to implement option. Usually, the principles of ACID are violated. We, for example, use RethinkDB, there is just a master-master. How downside - no transactions, etc. Buns, which are usually in relational databases. In this embodiment, all nodes can write data, from this all the problems.
    • master-slave . Easier to implement. He writes only master and shoots in the slaves. From the slaves can only be read. Hence the ease of implementation. If the master fails, then the slave usually votes for who will be the new master. If everything is successful, the slave becomes a master, and all the other slaves switch to it.

    Books can advise more in English only:

    • If it will not be difficult for you, you could tell what to watch, what to read? - Goldy
    • @Goldy I can only suggest links to English texts. Will do? - Suvitruf
    • Yes, of course it will. - Goldy
    • @Goldy updated the answer, added a couple of interesting resources. - Suvitruf