What is the difference between redundancy and replication in software?

For a recent exam that I studied for, I asked myself this question. I had two topics, redundancy and replication. At first I thought they were the same, but given a little more thought there was a significant difference. Both had to do with having more nodes or components. Here are my thoughts on this.


I knew what redundancy was, it is having more than one of a node/component in a system. This is used in case of a failover. If one node fails, the other take over - or just keep going. Here there is a difference between passive and active redundancy. In active redundancy traffic goes to all nodes. This is often achieved by having a loadbalancer in front to direct the traffic to every node. This can be done by round-robin or some more complex algorithm (chosing the one with lowest load for example). Redundancy can also be done passively where you switch over if the "active" node goes bad. This is often known as master/slave, where you always have one master and can have several slaves.

Therefore my definition of redundancy is:

Redundancy is the duplication of nodes, in case of one failing

However active redundancy can also be applied to get higher performance for a system. Instead of having one node serving everyone, you have 2 (or n+1). Which makes the first one less burdened. However the art of gaining performance through duplication of nodes is often better known as scaling.


So if redundancy is the duplication of nodes. Then what is replication? This is the tricky part. It is also redundancy as you have duplication of nodes. The big difference is that these are copying data between them. So to say that they synchronize state between them. This is often seen in databases or messagequeue systems - and is referred to as a cluster. If one node in a cluster goes down the system lives on.

Again there are two ways of doing this. There is active replication where each message goes to each node - they are therefore always all in sync and all ready to serve. Then there is passive replication. Here we have master/slave relationship again. The master gets all the requests and the slaves are updated by the master behind the scenes. Some systems are built to be "eventual consistent". With eventual consistency you could have all writes go to the master, but allow reads on the slaves. If the master goes down a slave will be promoted.

There for my definition of replication is:

Replication is synchronization of state between redundant nodes

That was my definition of Replication and Redundancy, I hope you liked it. If you did or did not, let me know in the comments!