Load Balancer Crash Simulator
Experiment with HA failover, stale DNS/client caches, backend health checks, fail-open routing, overload, latency, and recovery when a load balancer crashes.
Continue with the guided workspace
Use the paired workspace to connect this guide's mental model with live component state, visible signals, and the outcome each step or scenario is meant to prove.
Load balancers are critical components in modern architecture, serving as the single point of entry for user traffic.
Mental Model
When a load balancer crashes, the entire system is at risk of an outage unless resilient architectures are in place. In a High Availability (HA) active-passive setup, the standby load balancer monitors the active primary node via heartbeat keepalives. If heartbeats stop, the standby node promotes itself to active, taking over the virtual IP. Clients query a DNS server to resolve the load balancerβs IP; if the IP changes during failover, clients may continue targeting the dead node due to stale DNS caches (ignoring DNS TTLs). The load balancer routes traffic to a pool of backend servers, while a health checker monitors backend responsiveness, dynamically adding or removing nodes to prevent routing traffic to broken application instances.
Components and Why They Exist
Clients
The source of the request traffic consuming the application. Sends HTTP requests, caches DNS results, and handles connection failures by retrying or displaying errors. In the demo, watch the client panel send request signals and show successful/failed connections.
Active Load Balancer (LB A / LB B)
The primary entry point responsible for distributing traffic across healthy backend servers. Receives incoming client requests and routes them to backends while checking active session limits. In the demo, watch it route traffic and show an βactiveβ status.
Standby Load Balancer (LB A / LB B)
Provides failover redundancy to prevent a single point of failure. Monitors the active node via heartbeat pings and promotes itself to active if the primary node goes down. In the demo, watch its status transition to βactiveβ during failover.
DNS Server / Cache
Translates user-facing hostnames into the IP addresses of the active load balancer. Serves IP records with a set Time-to-Live (TTL) and manages mapping updates when a load balancer fails. In the demo, watch the TTL counter countdown before clients query the new IP.
Backend Nodes / Servers
The application pool that processes the request logic and queries databases. Accepts connections from the load balancer, queues requests, and returns responses within capacity constraints. In the demo, watch request dots queue up, and nodes light up red when overloaded.
Health Checker
Ensures the load balancer has an accurate view of backend node viability. Sends periodic probes to backend endpoints, removing unresponsive nodes and slowly warm-booting recovered ones. In the demo, watch health check success/failure status dots.
Edge Cases and Misconceptions
- Misconception: High Availability (HA) failover is instantaneous and zero-loss: HA failover always introduces a small detection window (e.g., keepalive timeout) where the standby node determines the primary is dead. During this transition, client requests will fail.
- Misconception: Reducing DNS TTL to 0 solves client cache issues: Many clients (browsers, JVM runtimes, proxy servers) ignore DNS TTL settings or enforce a minimum cache duration (e.g., 60 seconds). Even if DNS is updated, traffic will still flow to the dead nodeβs IP.
- Edge Case: Fail-Open Routing vs. Cascading Failures: When health checks mark all backends unhealthy (e.g., due to a temporary network partition between the LB and backends), a βfail-openβ policy routes traffic anyway to prevent a total outage. If the backends were actually overloaded, failing open might permanently crash them.
Common Questions
What is the difference between active-passive and active-active load balancer failover?
In an active-passive (active-standby) setup, only one load balancer routes traffic while the standby remains idle, promoting itself if the primary fails. In active-active, both load balancers route traffic simultaneously using DNS round-robin or Anycast, which increases total cluster throughput but makes capacity planning harder if one fails.
Why does traffic continue hitting a crashed load balancer even after DNS records are updated?
This is caused by stale DNS caches at the client, ISP, or local recursive resolver levels. Many HTTP clients and operating systems ignore short DNS TTL values (Time-to-Live) and cache IP addresses to save lookup latency, routing packets to the dead IP until the local cache decays.
What is the slow-start recovery mechanism for backend servers?
When a failed backend recovers, sending 100% of its normal traffic share immediately can overwhelm its cold caches and connection pools, causing it to crash again. Slow-start (or warm-up) gradually increases the request share routed to a recovered node over a set duration.
How do health checks distinguish between a slow backend and a dead backend?
Health checks use separate timeout limits and consecutive failure thresholds (e.g., 3 failed attempts). If a backend is simply slow due to high CPU load, it might still respond within a larger timeout, preventing the load balancer from prematurely removing it and compounding the load on remaining servers.