Learn to load test services with k6, find the real bottleneck, and turn results into a 12 month capacity plan tied to your SLOs.
The night the booking page fell over Capacity problems are never discovered in a meeting.
What each test type finds Each type of load test answers a different question, so running only one gives you a false sense of safety.
How to install and run k6 k6 is an open source load testing tool from Grafana Labs.
Turning an SLO into a k6 threshold A threshold is a pass or fail rule inside the test.
Use the USE method on every resource When latency rises under load, something is saturated.
How much headroom to keep Headroom is the gap between your peak traffic and the tested limit.
The night the booking page fell over Capacity problems are never discovered in a meeting.
What each test type finds Each type of load test answers a different question, so running only one gives you a false...
How to install and run k6 k6 is an open source load testing tool from Grafana Labs.
Turning an SLO into a k6 threshold A threshold is a pass or fail rule inside the test.
Use the USE method on every resource When latency rises under load, something is saturated.
How much headroom to keep Headroom is the gap between your peak traffic and the tested limit.
Measure the right traffic number A forecast is only as good as its input.
A worked example Take the cart service. Today's peak is 1,200 requests per second, and traffic has been growing about 8...
Lab overview You will run a small API whose database connection pool is deliberately too small.
Quick reference Common mistakes Testing with a closed model is the most common one.
Roles that use the skills in this module.
Site Reliability Engineer
DevOps Engineer
Platform Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetA load test applies the traffic you expect, such as a normal peak, to check that the service meets its SLO. A stress test keeps pushing past that point until something breaks, so you learn the real limit and how the service fails. You need both: the first proves you are safe today, the second tells you how much room you have.
Arrival-rate executors start new requests at a fixed rate whether or not earlier requests have finished. This copies real users, who do not wait politely for a slow server. Fixed-user (closed model) tests slow down automatically when the server slows down, which hides the overload you are trying to find.
A common starting point is to run at no more than 60 to 70 percent of the tested limit at peak. The rest absorbs traffic spikes, a lost zone or node, and slow scale-up. Tighten or loosen the number based on how fast you can add capacity and how costly an outage is.
You can, but only with care: low and ramped traffic, test accounts, no real payments or emails, and a kill switch. Most teams run full-scale tests in a production-like staging environment and use small, controlled tests in production. Never run your first stress test against production.
No. Autoscaling reacts to load, but it is limited by scale-up delay, node availability, quotas, and downstream limits such as database connections. Capacity planning sets the safe ceiling and the minimum baseline that autoscaling works within.