Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replication Modes Definitions?

I am currently examining different NoSQL and RDBMSes regarding their replication abilities in order to build distributed systems.

Reading through several papers and books, I get the feeling, that some vendors or authors use their own definitions regarding the terms

  • Master-Master Replication (Replication between two servers)
  • Master-Slave Replication (Replication between mutliple Servers in order to increase reading speed, writes are only able for the master server)
  • Multi-Master Replication (= Peer-To-Peer?)
  • Peer-To-Peer Replication (replication between n nodes, each can read/write)
  • Merge Replication (?)

E.g: Some mix up the terms Master-Master and Peer-to-Peer as the same, while in Mysql docus for instance I found it is differentiated between Master-Master and Multi-Master (=Peer-to-peer???) Replication.

Where is the difference in Multi-Master and Peer-to-Peer replication? Is Multi-Master replication's use case more oriented towards Clustering while Peer-To-Peer targets distributed content to distributed applications?

I would like to sort things out and be sure that I have the right understanding in these terms, so maybe a discussion in here would help to merge some knowledge.

Regards, Chris

Edit: added merge replication to the list and some explanations as I understand them...

like image 939
chris polzer Avatar asked Mar 28 '11 14:03

chris polzer


1 Answers

Regarding CouchDB, the story is simple. Here it is:

There is only one replication mode for CouchDB. The source copies all its data to the target, subject to an optional yes/no filter. I described CouchDB replication in another question. The key point is that "replication" is simply a DB client. It connects to both couches, reads from the source, and writes to the target.

Any other big-picture architecture (peer-to-peer, multi-master, master-slave) is just the implementation of the developers or the system administrators. For example, if GETs are distributed to many couches, but POST go to one central couch which replicates to the others, that is effectively master-slave. If you put a CouchDB in every major city for performance, and they replicate directly with each other, that is multi-master replication.

Within the CouchDB community, and especially from Chris Anderson's projects and presentations, "peer-to-peer" replication is a concept where CouchDB is everywhere: mobile phones, data centers, telephone poles. And replication happens directly between couches in a decentralized way, without a central authority or architecture, like the web itself.

like image 187
JasonSmith Avatar answered Nov 18 '22 06:11

JasonSmith