Fail-Over
Last updated
What is Fail-Over?
Failover is an availability pattern that is used to ensure that a system can continue to function in the event of a failure. It involves having a backup component or system that can take over in the event of a failure.
In a failover system, there is a primary component that is responsible for handling requests, and a secondary (or backup) component that is on standby. The primary component is monitored for failures, and if it fails, the secondary component is activated to take over its duties. This allows the system to continue functioning with minimal disruption.
Failover can be implemented in various ways, such as active-passive, active-active, and hot-standby.
Active-passive
With active-passive fail-over, heartbeats are sent between the active and the passive server on standby. If the heartbeat is interrupted, the passive server takes over the active's IP address and resumes service.
The length of downtime is determined by whether the passive server is already running in 'hot' standby or whether it needs to start up from 'cold' standby. Only the active server handles traffic.
Active-passive failover can also be referred to as master-slave failover.
Active-active
In active-active, both servers are managing traffic, spreading the load between them.
If the servers are public-facing, the DNS would need to know about the public IPs of both servers. If the servers are internal-facing, application logic would need to know about both servers.
Active-active failover can also be referred to as master-master failover.
Disadvantages of Failover
- Fail-over adds more hardware and additional complexity.
- There is a potential for loss of data if the active system fails before any newly written data can be replicated to the passive.
Free resources to learn Fail-Over
- Open sourceFail Over
- ArticleActive-Passive vs. Active-Active Failover
More in stage 7: Background Jobs
Fail-Over: common questions
Can I learn Fail-Over in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Fail-Over in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Fail-Over tutorial for beginners?
It is lesson 17 of 147 in the free System Design roadmap, in stage 7, Background Jobs. If you are new to System Design, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.