Replication vs Redundancy
Asked Answered
H

5

16

I am currently reading about Distributed Systems and I am facing two different terms which are described in a similar manner: Replication and Redundancy.

Can anyone explain each term in part?

Hendiadys answered 4/3, 2020 at 21:3 Comment(0)
H
38

The two terms are at the first look pretty similar, but there is a significant difference between them.

The common part of the two terms is the fact that each of has something to do with more nodes/components/processes in a system.

  1. Redundancy - describes the fact that you have more than one node/component/process in a system and it's pretty useful for handling failovers. In the case that one of your nodes fail, another node in the system can take over and carry on. Redundancy can be:
  • active - where all the traffic goes to all nodes at the same time
  • passive - where one node receive traffic and in the case of failure, a switch will be made to another node.

"Redundancy is the duplication of nodes, in case of some of them are failing"

  1. Replication - includes redundancy, but involves the copying of data from one node to another or the synchronization of state between nodes. An example of where replication is done is at the databases or MQs level that forms a cluster. Replication can be:
  • active: each node receives each message in order to keep in sync with the rest of the nodes
  • passive: this is the leader-follower model, where the leader receives all the requests and then forwards them to the followers.

"Replication is the synchronization of state between redundant nodes."

Hendiadys answered 4/3, 2020 at 21:3 Comment(1)
Both comes when we need High Availability . Redundancy - Active -Passive ( One node is active and another in passive . Replication. - Active - Active (Both nodes are active)Leger
G
1

Redundancy : Duplication of critical components (node, process) with the aim to achieve reliability. Redundancy helps avoid single-point failure. For instance, if we have two instances running and one of them fails then, then the system can switch over to another one.

Replication : Sharing information to ensure consistency between redundant resources.

Gestate answered 16/11, 2021 at 15:12 Comment(0)
E
0

Redundancy increases the reliability while Replication ensure Consistency.

Electrotechnology answered 17/1, 2021 at 23:58 Comment(1)
Replication does not necessary ensure Consistency.Residentiary
S
0

Reduncancy

Redundancy is the term used to create a fault-tolerant system. Reduncancy is about keeping redundant capacity (backup) within a system to increase its reliability. A secondary capacity is kept ready as a backup, over and above the primary capacity. To create a fault-tolerant system we follow those steps:

  • we provide redundancy

  • build a system in such a way that it can detect faults that are happening in an automated fashion

  • then recover from detected faults by using the reduncany that has been provided

There are 3 types of reduncancy:

1- Active Reduncany (Hot SPare)

like, backup engines in airplanes. Main and backup engines both are running simultaneously and in case of main engine failure, our system will switch to backup engine

2- Passive Reduncancy (Warm Spare):

it is like substitute players in a soccer game. It is not as quick as active redundancy

3- Cold Reduncany Spare(Backup):

backup tires in cars. there is a significant time delay.

Replication

Replication is the term used in database design. It is the process of copying the data that reduces the latency.

In database design, the most common design is Primary/Secondary design. Primary node is used for writing data, and Secondary node is used for reading data by the users. If Primary goes down, our system will assing the Secondary as Primary. As you see, we have redundancy here, in case of failure we are assigning another component to take over.

In sync replication (atomic) after data is written to the Primary node by the client, the same data is passed to the Secondary node. If both transactions are successful then this transaction is committed, otherwise, everything will be rolled back to change the state will cause more transactions. this has higher latency but our Primary and Secondary databases will be in sync all the time. So when the Primary db goes down, secondary will switch to be Primary and this operation will be very quick. It is similar to airplane engines example. With sync replication, we have active-active redundancy.

In async replication once the data is written to the Primary, acknowledgment is sent to the client, then data is written to the Secondary node. This has lower latency because acknowledgment is sent to the user earlier. Let's say you had multiple write requests and you write them to the Primary, send the acknowledgment to the user and while those data is propagated to the Secondary node, if Primary goes down, Secondary will have some missing data and your system will promote the the Secondary as Primary so your new database will have some missing data. In async replication we have passive redundancy

The database is a stateful component, we are replicating the state here. If our system is more read-heavy system, then we might have to have more Secondary (or Read) nodes, so we provide redundancy and replication here.

Stoplight answered 28/1, 2023 at 4:58 Comment(0)
P
0

When studying System Design, I got confused with these words, but later I found a simple explanation from here.

When you replicate something, you get a copy that's almost the same as the original, but not quite the same. There is usually some sort of difference between the original and the replicate. The original and its copy can have different sizes, for example. So, the idea behind replication is that the replicate is always slightly different from the original at least in terms of its identity.

As for the other term, the result of the process of duplication is a duplicate, which is an identical copy of the original in all of its aspects. If you make a duplicate of the keys to your house, the duplicate is going to be absolutely identical to the original keys in all respects. This means that a duplicate of something is as good as the original and can be used to replace it completely while this is usually not true for replicates.

Peper answered 15/2, 2023 at 11:52 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.