Here’s what most Linux developers don’t know: the kernel has been able to simulate a terrible network since the early 2000s. No tools to install. No Docker container. No external service. It’s sitting on your system right now, part of iproute2, which ships on virtually every Linux distribution.
It’s called netem — network emulator — and it’s accessed through a two-letter command: tc.
‘tc’ stands for traffic control. Its job is managing the queuing disciplines — qdiscs — that govern how packets move through your network interfaces. By default your interface uses a simple qdisc that sends packets out as fast as possible in order. netem replaces that default with something that intercepts every outgoing packet and does something deliberate to it before it hits the wire.
That’s it. No install. No config file. No daemon. You just told the kernel to wreck your own network, and the kernel said fine.
This is not a proxy sitting in front of your traffic. It’s not a simulation layer. It’s happening inside the kernel’s actual network stack, on real packets, on a real interface. When you curl an API with 600ms of latency applied, you are experiencing what your users in bad network conditions experience. Exactly.
Read More Here: https://hackernoon.com/your-linux-os-has-a-chaos-engine-and-nobody-told-you
