ArticleslgStudy

computer science

Multi-master replication

Multi-master replication is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Multi-master replication rather than just read about it. In short: Multi-master replication is a method of database replication which allows data to be stored by a group of computers, and updated by any member of the group. All members are responsive to client data queries.

Key takeaways

  • Multi-master replication belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Multi-master replication to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Multi-master replication from memory before moving on to harder problems.

Reference excerpt

Multi-master replication is a method of database replication which allows data to be stored by a group of computers, and updated by any member of the group. All members are responsive to client data queries. The multi-master replication system is responsible for propagating the data modifications made by each member to the rest of the group and resolving any conflicts that might arise between concurrent changes made by different members. Multi-master replication can be contrasted with master-slave replication, in which a single member of the group is designated as the "master" for a given piece of data and is the only node allowed to modify that data item. Other members wishing to modify the data item must first contact the master node. Allowing only a single master makes it easier to achieve consistency among the members of the group, but is less flexible than multi-master replication. Multi-master replication can also be contrasted with failover clustering where passive replica servers are replicating the master data in order to prepare for takeover in the event that the master stops functioning. The master is the only server active for client interaction. Often, communication and replication in Multi-master systems are handled via a type of Consensus algorithm, but can also be implemented via custom or proprietary algorithms specific to the software. The primary purposes of multi-master replication are increased availability and faster server response time.

Advantages Availability: If one master fails, other masters continue to update the database. Distributed access: Masters can be located in several physical sites, i.e. distributed across the network.

Disadvantages Consistency: Most multi-master replication systems are only loosely consistent, i.e. lazy and asynchronous, violating ACID properties. Performance: Eager replication systems are complex and increase communication latency. Integrity: Issues such as conflict resolution can become intractable as the number of nodes involved rises and latency increases.

Implementations

Directory services Many directory servers are based on Lightweight Directory Access Protocol (LDAP) and implement multi-master replication.

Active Directory One of the more prevalent multi-master replication implementations in directory servers is Microsoft's Active Directory. Within Active Directory, objects that are updated on one Domain Controller are then replicated to other domain controllers through multi-master replication. It is not required for all domain controllers to replicate with each other as this would cause excessive network traffic in large Active Directory deployments. Instead, domain controllers have a complex update pattern that ensures that all servers are updated in a timely fashion without excessive replication traffic. Some Active Directory needs are however better served by Flexible single master operation.

CA Directory CA Directory supports multi-master replication.

OpenDS/OpenDJ OpenDS (and its successor product OpenDJ) implemented multi-master since version 1.0. The OpenDS/OpenDJ multi-master replication is asynchronous, it uses a log with a publish-subscribe mechanism that allows scaling to a large number of nodes. OpenDS/OpenDJ replication does conflict resolution at the entry and attribute level. OpenDS/OpenDJ replication can be used over a wide area network.

OpenLDAP OpenLDAP, the widely used open-source LDAP server, implements multi-master replication since version 2.4 (October 2007) [1].

Database management systems

Amazon Aurora Amazon Aurora is composed of writer nodes, which replicate redo records, and 6 storage nodes. The writer node sends change to each storage node, each of which checks for conflicts then reports confirmation or rejection of the change.

Apache CouchDB Apache CouchDB uses a simple, HTTP-based multi-master replication system built from its use of an append-only data-store and use of Multiversion Concurrency Control (MVCC). Each document contains a revision ID, so every record stores the evolutionary timeline of all previous revision IDs leading up to itself—which provides the foundation of CouchDB's MVCC system. Additionally, it keeps a by-sequence index for the entire database. "The replication process only copies the last revision of a document, so all previous revisions that were only on the source database are not copied to the destination database." The CouchDB replicator acts as a simple HTTP client acting on both a source and target database. It compares current sequence IDs for the database, calculates revision differences, and makes the necessary changes to the target based on what it found in the history of the source database. Bi-directional replication is the result of merely doing another replication with the source and target values swapped.

ArangoDB ArangoDB is a native multi-model database system using multi-master replication. Clusters in ArangoDB use the CP master/master model with no single point of failure. When a cluster encounters a network partition, ArangoDB prefers to maintain its internal consistency over availability. Clients experience the same view of the database regardless of which node they connect to. And, the cluster continues to serve requests even when one machine fails.

Cloudant Cloudant, a distributed database system, uses largely the same HTTP API as Apache CouchDB, and exposes the same ability to replicate using Multiversion Concurrency Control (MVCC). Cloudant databases can replicate between each other, but internally, nodes within Cloudant clusters use multi-master replication to stay in sync with each other and provide high availability to API consumers.

eXtremeDB Cluster eXtremeDB Cluster is the clustering sub-system for McObject's eXtremeDB embedded database product family. It maintains database consistency across multiple hardware nodes by replicating transactions in a synchronous manner (two-phase commit). An important characteristic of eXtremeDB Cluster is transaction replication, in contrast to log file-based, SQL statement-based, or other replication schemes that may or may not guarantee the success or failure of entire transactions. Accordingly, eXtremeDB Cluster is an ACID compliant system (not BASE or eventual consistency); a query executed on any cluster node will return the same result as if executed on any other cluster node.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Multi-master replication

Start with the simplest possible case. Write down what Multi-master replication claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Multi-master replication before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Multi-master replication ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Multi-master replication

In research
Multi-master replication appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Multi-master replication in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Multi-master replication is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed computing architecture, Identity management, so understanding it makes those chapters shorter.
In everyday life
Look for Multi-master replication outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Multi-master replication” →

How to study Multi-master replication in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Multi-master replication means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Multi-master replication out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Multi-master replication in simple terms?

Multi-master replication is a method of database replication which allows data to be stored by a group of computers, and updated by any member of the group. All members are responsive to client data queries.

Why does Multi-master replication matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Multi-master replication?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Multi-master replication.

Tags

  • Distributed computing architecture
  • Identity management

Keep exploring