N
N
noob11112017-01-12 21:52:49
MySQL
noob1111, 2017-01-12 21:52:49

Using peer-to-peer replication?

When is this type of replication used? I would like to get examples of practical application, maybe someone had to implement such a topology in practice.
Thanks in advance for all your replies)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2017-01-12
@MechanID

If you mean master-master replication, then it is good as a hot standby, and allows you to switch clients between servers without downtime and data loss.
A practical example is a very loaded web site on a cluster of servers:
two balancers with vrrp (keepalived),
four nginx + php web servers
, two mysql database servers, replication master master between them, 1st server under load, 2nd in reserve.
If I need to update the kernel or, for some reason, disable any of the servers, for example, take the 1st server.
Then I just change the ip of the current active database server on the balancer - this change will not affect the operation of the site, after that I check that all queries are already running on the 2nd server (some long queries can take up to 10 seconds and you need to wait for their execution so that their results get to server 2).
After that, you can stop mysql on the 1st server and carry out those updates, etc.
After that work, I run mysql on the 1st server and it itself synchronizes with the 2nd one up to date.
when the synchronization is completed, I add the 1st server on the balancer as a backup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question