Fail-over

It is a mechanism where a stand-by system is running alongside the main one, and when the main one fails, the stand-by one swaps with it. Once the main one is restored, they swap again.

Active-passive

Sometimes referred as Master-Slave. Both systems are connected to each other and heartbeats are sent between the active and passive server on stand-by. When there’s interruption in a heartbeat, the stand-by server takes over the IP address and resumes service.

The length of downtime when using fail-over depends on whether the stand-by is ‘hot’ or needs to start from ‘cold’ stand-by.

Transclude of Fail-over-Active-Passive

Active-active

Sometimes referred as Master-Master. Both servers are managing traffic at the same time and they spread the load between each other.

When your servers are public-facing, the DNS will have to know about IPs of both. If your servers are internal, your logic will have to know about both.

Disadvantages

  • Danger of loss data if active system fails before a newly takes over and newly written data can be replicated to the passive

Example

  • Database, where there’s a replica that will swap with the main instance until it’s restored
  • Using load balancer to redirect to healthy servers if one fails

Replication

Master-Slave

Tree replication

Master-Master

Buddy replication