1. Library
  2. Computer Networks
  3. Performance and Reliability
  4. Reliability

Updated 8 hours ago

Redundancy is the art of buying time.

Every system fails eventually. Hard drives die, network cables get unplugged, entire data centers lose power. The question isn't whether components fail—it's how long you have between failure and impact. Redundancy extends that window. Failover determines whether you use it.

The principle is simple: don't rely on any single component. If a server can fail, have multiple servers. If a network connection can fail, have multiple connections. If a data center can fail, have multiple data centers. The practice is harder—every layer of redundancy adds cost, complexity, and new ways to fail.

Where Redundancy Lives

Redundancy exists at every layer of the stack, and each layer protects against different failure modes.

Hardware

At the physical level, redundancy protects against component failures:

Redundant power supplies mean a server with two power supplies continues running if one fails. Redundant network cards (bonded or teamed interfaces) maintain connectivity if one card dies. RAID storage spreads data across multiple drives—lose one drive, data survives through the others.

Dual power feeds connect servers to separate circuits, protecting against breaker trips. Critical facilities connect to separate electrical grids with backup generators for when both fail.

This is commodity redundancy. It's table stakes for any serious infrastructure.

Network

Network failures are common and often cascade, so network redundancy matters more than most teams realize:

Multiple network paths ensure traffic can flow via alternate routes when one path fails. Mesh topologies create redundant paths between any two points.

Multi-homing—connections to multiple ISPs—protects against ISP outages. When one provider has problems, traffic automatically routes through others.

Load balancers in high-availability pairs eliminate the load balancer itself as a single point of failure. Active-passive pairs have one handling traffic while the other waits. Active-active pairs both handle traffic and can each absorb full load if one fails.

Geographic redundancy places resources in multiple locations. When an entire data center becomes unreachable, others continue serving.

Application

At the application layer, redundancy means running multiple instances:

Horizontal scaling runs multiple identical instances with a load balancer distributing requests. If one instance fails, others continue. This is fundamentally different from vertical scaling (bigger servers), which provides no redundancy—when your single large server fails, you're down.

Database replication maintains multiple copies of data. Primary-replica setups have one writable primary and read-only replicas. If the primary fails, a replica can be promoted.

Microservices create redundancy through isolation. If your payment service fails, your product catalog might continue functioning. Monolithic architectures fail completely when any component fails.

Multi-region deployment protects against regional failures—natural disasters, power grid failures, network partitions. Running in multiple geographic regions means no single region's problems bring down your entire service.

How Failover Actually Works

Having redundant components is half the solution. You need mechanisms to detect failures and shift traffic to working components—ideally before users notice.

Detection

Health checks continuously probe services. A load balancer might send HTTP requests every few seconds; if several consecutive checks fail, it stops sending traffic to that server.

Health checks require careful tuning. Check too frequently and you create overhead. Check too slowly and you don't detect failures quickly. Check for the wrong things and you trigger false positives or miss real failures.

Heartbeat monitoring has services regularly send "I'm alive" signals. When heartbeats stop, monitoring systems assume failure and trigger failover.

Consensus systems like Raft or Paxos coordinate failover in distributed systems. When a primary fails, remaining nodes vote on a new primary, ensuring exactly one node takes over.

Switching

Virtual IP failover uses shared IP addresses that move between servers. When the active server fails, its virtual IP migrates to the standby. Clients continue using the same address without knowing a failover occurred.

DNS failover changes DNS records to point to working servers. This is slower—DNS records are cached—but works across geographic regions where virtual IPs can't.

Speed

How quickly failover occurs dramatically affects user experience:

Hot standby systems run continuously, ready to immediately accept traffic. Failover happens in seconds. You're paying for idle capacity, but recovery is nearly instant.

Warm standby systems are running but not actively processing traffic. Failover takes tens of seconds to minutes while the standby catches up on recent changes.

Cold standby systems aren't running. They must be started when needed, requiring minutes to hours. Cheapest but slowest—acceptable only for systems that can tolerate extended outages.

Active-active eliminates failover delay entirely. All systems actively serve traffic. When one fails, remaining systems handle a larger share. No failover delay, just capacity reduction.

The Hard Problems

Redundancy and failover introduce complexity that can undermine the reliability they're meant to provide.

Synchronization

Keeping redundant systems synchronized is genuinely hard. When you write data to the primary database, how quickly does it reach replicas?

Synchronous replication waits until replicas confirm receiving data before acknowledging writes. Guarantees replicas are current, but adds latency to every write.

Asynchronous replication acknowledges writes immediately and replicates in the background. Faster, but replicas lag behind. If the primary fails, recent writes might be lost.

The trade-off is between consistency and performance. Financial transactions might require synchronous replication despite the cost. Social media posts might accept asynchronous replication for speed.

Split-Brain

This is the nightmare scenario.

Split-brain occurs when network partitions cause both primary and standby to believe they're primary. Now you have two systems accepting writes, causing data divergence and corruption. Your redundancy has turned against you.

Preventing split-brain requires coordination:

Quorum systems require majority agreement before taking actions. If 5 nodes partition into groups of 2 and 3, only the 3-node group has quorum and can elect a new primary.

Fencing forcibly disconnects failed primaries from shared resources like storage, ensuring only one system can write at a time.

Witness services are third-party arbitrators that break ties. In a two-node cluster, a witness determines which node should be primary during partitions.

Cost

Redundancy is expensive. Active-active means paying for double the infrastructure while using half during normal operation.

The cost must be justified by the value of availability. A service generating $1 million per hour can easily justify $500,000 annually for redundancy that prevents outages. A personal blog cannot.

Testing

Failover procedures must be tested regularly. Untested failover often doesn't work when actually needed—configurations drift, dependencies change, procedures become outdated.

Chaos engineering intentionally causes failures in production to verify failover works. Netflix built Chaos Monkey to randomly kill production servers, ensuring their systems survive real failures.

If you've never tested your failover, you don't have failover. You have hope.

Complexity

Every layer of redundancy adds complexity. More components mean more potential failures, more monitoring required, more operational procedures, more things operators must understand.

Sometimes simpler systems with less redundancy are more reliable than complex highly-redundant systems where the redundancy mechanisms themselves introduce failure modes. The most reliable system is often the simplest one that meets requirements.

Choosing the Right Level

Appropriate redundancy depends on what you're protecting against:

Component-level (redundant power supplies, RAID) protects against hardware failures but not server-level failures. Suitable for services tolerating brief outages.

Server-level (multiple application instances) protects against individual server failures. Suitable for stateless applications where any server can handle any request.

Data center-level (multi-availability-zone deployment) protects against facility failures—power outages, cooling failures, network issues. Necessary for critical services.

Region-level (multi-region deployment) protects against large-scale regional failures. Required for globally critical services or regulatory compliance.

Each level adds cost and complexity. The right level balances availability requirements against budget and operational capability.

Monitoring Your Redundancy

Redundancy doesn't help if you don't know when it's degraded:

Component health monitoring tracks each redundant component's status. Just because the service is up doesn't mean all redundancy is intact—you might be running at reduced redundancy without knowing.

Capacity monitoring ensures remaining components can handle load if others fail. If you need 3 servers for peak load and have 4 for redundancy, losing 2 during peak creates an outage despite having "redundancy."

Failover testing verifies mechanisms themselves work. Automated tests that trigger failover and verify success ensure you'll fail over correctly during real incidents.

Redundancy and failover are essential for high availability. But they must be designed thoughtfully, tested regularly, and monitored continuously. Otherwise, they add complexity without benefit—the worst possible outcome.

Frequently Asked Questions About Redundancy and Failover

Was this page helpful?

😔
🤨
😃
Redundancy and Failover • Library • Connected