Replication

<aside> 💡 Replication is the process of keeping a copy of data in more than one site or node.

</aside>

A node that has a copy of data is called replica.

There are two primary reasons for replicating data.

  1. Data are replicated to increase the reliability of a system.

  2. Data are replicated for better performance.

    Replication for performance is important when a distributed system needs to scale in terms of size or in terms of the geographical area it covers.

Problems of replication

Strong consistency

A replicated storage system is strongly consistent if clients can’t tell that it’s replicated. E.g., clients should think that there’s only one data storage system(even though, under the hood, there could be multipl+ing together).

Primary Backup Replication

Write operations

Снимок экрана 2022-11-13 в 6.08.40 PM.png

Снимок экрана 2022-11-13 в 6.11.45 PM.png

Read operators

Advantages & disadvantages of Primary Backup replication

Advantages

Disadvantages

Chain Replication

Write operations

Снимок экрана 2022-11-13 в 6.27.07 PM.png