Course contentsShow
← System Design
Lesson 104 of 1,9193. Load BalancingFree lesson

Failover Fundamentals

Failover automatically redirects traffic from failed servers to healthy ones, minimizing downtime and maintaining service availability.

Failover Fundamentals

What you'll learn: How failover automatically keeps your service running when servers fail.

What Is Failover?

When a load balancer marks a server as unhealthy through health checks, failover is the process of automatically redirecting all traffic away from that failed server to remaining healthy servers. It's the recovery mechanism that prevents downtime when hardware fails, applications crash, or networks disconnect.

Think of failover like a bridge with multiple lanes. When one lane closes due to an accident, traffic controllers (the load balancer) immediately guide all cars to use the remaining open lanes. Drivers reach their destination without turning back—they just take a different path.

How Failover Works

When a server fails a health check:

  1. The load balancer marks it as unavailable
  2. New requests are instantly routed to healthy servers only
  3. The failed server is taken out of the rotation
  4. Load is redistributed across remaining servers
  5. The failed server stays excluded until it passes health checks again

Failover happens automatically without manual intervention. The load balancer continuously monitors health and adjusts routing in real-time, often within seconds of detecting a failure.

Why Failover Matters

Without failover, a single server failure means some users hit a dead end and see errors. With failover, users experience seamless service—they might not even know a server went down. This directly improves availability (one of your non-functional requirements).

The effectiveness of failover depends on your health check configuration: shorter intervals mean faster detection and recovery, but too frequent checks can add unnecessary load.

Key Takeaway: Failover is the automatic traffic redirection from failed servers to healthy ones, making your system resilient to individual server failures and maintaining high availability without manual intervention.