What is Failover?
Failover, told as a story about a spare generator that automatically takes over when the main one dies.
The main generator died and the whole park went dark.With no spare, it takes forever.
Depend on just one thing, and the moment it stops, everything stops.Everything connected stops together.
When the main generator dies, the spare automatically takes over.Normally off, the spare switches itself on the moment it's needed.
Detect, signal, switch — the three happen automatically, one after another.The moment the main one stops, the spare takes over right away.
That brief instant of switching can still be felt.Skip the occasional test, and the spare might be broken too.
Failover = keeping a spare off until it's needed, then automatically detecting and switching to it the moment the main one dies, to keep the service going. The switch is never perfectly invisible, but testing it now and then confirms the spare actually works.
A mechanism that automatically switches to a standby component when one fails. It can be active-passive (the spare waits idle) or active-active (both take traffic), and the time a switch takes is called the failover time.
When grown-ups say it
- Failover
- Switching to the spare when the main generator dies. It only works if it happens automatically and fast.
- Active-passive
- The spare just waits, idle, most of the time. It only switches on once the main one stops.
- Active-active
- Both take guests at the same time, all along. If one stops, the other is already running.
- Automatic switch
- Switching over by itself, with no one pressing a button. A manual switch is slower by exactly that much.
- Failover time
- How long the switch takes from start to finish. Zero seconds is hard — that brief instant can still be felt.
- Health check
- Continually checking whether the main generator is still alive. Without it, nothing can automatically notice the main one is down.
- Multi-region
- Keeping a whole spare city, not just a spare generator. Failover scaled up to the size of a city. → the twin park
- Replication
- Keeping the same log copied over to the spare side too. A spare that takes over with no log is useless.