Load testing and bottlenecks
Prove your system holds up under realistic load — before your users do it for you.
- Run a load test to find where a system breaks
- Read how a system behaves as load increases
- Use results to find and shift the bottleneck
You've measured, fixed the code, and scaled. Does it actually hold up? Load testing answers that by simulating realistic traffic before real users generate it — turning "I think it'll be fine" into evidence. It's the testing discipline applied to performance.
What a load test does
A load-testing tool fires many simulated requests at your system and records how it responds as the rate climbs. You're looking for the point where behaviour degrades:
- Throughput — requests handled per second. It rises with load, then plateaus.
- Latency — response time. It stays flat, then climbs sharply near the limit.
- Error rate — should be ~0, then spikes when the system is overwhelmed.
The knee in those curves — where latency shoots up and errors begin — is your system's current ceiling. Now you know your real capacity, not a guess.
Kinds of test
- Load test: expected peak traffic — can you handle a normal busy day?
- Stress test: push past the limit — how does it fail? Gracefully (the designing-for-failure lesson) or catastrophically?
- Soak test: sustained load over hours — does it leak memory or degrade over time?
Chase the moving bottleneck
When a load test reveals the limit, profile at that load to find the bottleneck (measure-before-you-scale, under pressure). Fix it — add a replica, an index, a cache — and the bottleneck moves somewhere else. Performance work is iterative: relieve one constraint and the next appears. Stop when you comfortably meet your target (the SLO), not when the system is theoretically perfect.
Test against a production-like environment with production-like data. A load test on a tiny staging box with 100 fake rows tells you almost nothing about how the real system behaves with millions.
Where to go next
That completes the Advanced Fundamentals tier — production delivery, observability, security, distributed systems, and scaling. From here, the Advanced tiers of the Python and JavaScript tracks apply these ideas in each language.