Interview Prep/Networking/Performance, MTU, Latency & Tools

How do you simulate latency and packet loss to test application behavior?

IntermediateScenarioPerformance, MTU, Latency & Tools
Answer

Situation read → Chaos testing at the network layer.

What I'd do →

  1. Use tc netem: sudo tc qdisc add dev eth0 root netem delay 100ms 20ms loss 1%
  2. Verify with ping and tc qdisc show dev eth0
  3. Remove with sudo tc qdisc del dev eth0 root
  4. Use toxiproxy or Chaos Mesh for containers and Kubernetes
  5. Run tests against timeouts and retry settings

Why → Applications that look fine on a LAN often fail under 100 ms RTT or 1% loss.

Interview tip → Say you test timeouts, not only throughput.

All Networking questions Roadmap: Networking for DevOps

More on Performance, MTU, Latency & Tools