Course contentsShow
← Cloud and Infrastructure
Lesson 2495 of 2,98953. High Availability PatternsFree lesson

Network Chaos Patterns

Injecting latency, packet loss, and connectivity failures to test service resilience to network issues.

Network Chaos Patterns

What you'll learn: How to intentionally inject network failures—latency, packet loss, and connectivity issues—to verify your services can withstand real-world network instability.

The Core Idea

Network chaos patterns are controlled experiments where you deliberately introduce network-level faults into your infrastructure. By injecting latency spikes, dropping packets randomly, or severing connections entirely, you validate whether your high-availability designs actually work under stress. Think of it like a fire drill: you want to discover weaknesses in a controlled setting, not during a production outage.

Why Networks Fail

Real-world networks are unpredictable. A misconfigured router, a congested link, or a DNS hiccup can cascade into downtime. By simulating these conditions intentionally, you answer critical questions: Do your circuit breakers activate correctly? Does failover happen automatically? Can clients gracefully degrade when replicas are unreachable?

Common Network Chaos Patterns

Latency Injection: Add delays (e.g., 200ms) to requests between services. Tests whether timeouts are properly configured and if slow dependencies trigger circuit breakers.

Packet Loss: Drop 5-10% of packets to simulate flaky connections. Validates retry logic and connection pooling behavior.

Connectivity Failures: Completely block traffic between specific components (e.g., app server to database). Confirms failover to read replicas and that health checks detect the outage.

The Practice

Start with non-production environments. Define your steady state (normal latency, throughput). Apply one fault pattern with a limited blast radius. Observe whether your system maintains availability or gracefully degrades as designed. Document what breaks—those are your single points of failure.

Key Takeaway: Network chaos patterns intentionally disrupt connectivity to prove your resilience mechanisms—health checks, failovers, and circuit breakers—actually protect availability when networks misbehave.