Load & limit testing
Find the knee of the latency curve, test to failure not to target, replay production traffic shapes. A number without a saturation point is not capacity.
The mental model
A bridge engineer does not certify a bridge by driving one car across it and declaring "it held." They load it until it groans — past the rated weight, watching where it flexes, finding the point where it would actually fail — and then they set the rated limit comfortably below that. The number that matters isn't "it survived the expected load." It's "here is exactly where it breaks, and here is how far below that we're operating." A bridge tested only to its expected load is a bridge whose real limit nobody knows.
Load testing is finding where your service groans and breaks. The single most common mistake — the one that separates a checkbox load test from a real one — is testing to your target instead of testing to failure. "We need to handle 10,000 QPS; we ran 10,000 QPS; it passed." That tells you almost nothing useful. It doesn't tell you whether you break at 10,100 or 40,000. It doesn't tell you the *shape* of the failure — graceful degradation or a cliff. It doesn't give capacity planning a per-unit number. A number without a saturation point is not capacity; it's a single sample on an unknown curve.
The thing you're actually looking for is the knee of the latency curve — the point where adding more load stops adding proportional throughput and starts making latency climb steeply. Below the knee, the system is linear and healthy. At the knee, queues start building faster than they drain. Past the knee, latency explodes and throughput often falls (goodput collapses). The knee, not the max, is your real capacity, because past it you're violating your SLO even though the box hasn't fallen over yet.
The three commitments of a real load test:
- Test to failure, not to target — push until the knee and beyond, so you know where the cliff is and how far you are from it.
- Find the knee — the load level where latency (especially the tail) starts climbing non-linearly, which is your usable per-unit capacity.
- Replay realistic traffic shapes — real request mixes, real payload sizes, real concurrency and think-time, not a uniform hammer, or you measure a system that doesn't exist.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision