Most of us test our networked code on a fast, reliable local connection — which means we're testing a fantasy. The real world has packet loss, jitter, reordering, and latency that will quietly destroy assumptions you didn't know you'd made.
The fix has been in the Linux kernel since the early 2000s. No extra tools, no containers — just tc and netem, sitting there unused on basically every Linux machine. This post is about how to use them, and why you probably should have been using them all along.