Load testing a web app (JMeter or k6)
Find how many users your own app can handle, where it slows down, and what one fix improves it.
Intermediateâą 6â10 hoursđĒ 7 stepsApache JMeter or k6Your own app
What you'll learn
- âLoad, stress and spike tests
- âThroughput, latency percentiles and error rate
- âFinding and fixing a bottleneck
What you'll build
- âRealistic user scenario script
- âRamp-up test to find the limit
- âReport with p95 latency and errors
- âBefore/after comparison of one fix
Step-by-step guide
- 1
Only test your own systems
Load testing someone else's site is like an attack. Use your app on your machine or your own server.
- 2
Scenario
Record or write a flow: open home, search, view item, add to cart (JMeter Thread Group or a k6 script).
- 3
Ramp up
Increase from 10 to 200 virtual users over 10 minutes; watch response times and errors.
- 4
Read results
Focus on p95 latency, throughput (requests/second) and error rate, not the average.
- 5
Find the bottleneck
Check server CPU, database slow queries (EXPLAIN) and missing indexes.
- 6
Fix one thing
For example add an index or a cache, then rerun the same test.
- 7
Report
A one-page report: setup, graphs, bottleneck, fix, improvement.
đ Make it stand out
- +Run tests in CI with thresholds
- +Spike and soak tests
- +Grafana dashboard for results