k6 Load Testing
URL: http://109.199.120.120:9000 Source:/opt/coderz/configs/k6-runner/app.py
k6 is a modern load testing tool built for developers. In the Coderz Stack, it runs with a web UI that lets you launch load tests against any service without writing code. Results appear in real-time in Grafana.
What Is Load Testing?
Load testing simulates multiple concurrent users hitting an API to:- Find the breaking point — at what request rate does the API fail?
- Measure performance — response time at 100, 500, 1000 users
- Catch regressions — is the new deployment slower than the old one?
- Validate infrastructure — can the server handle peak traffic?
Available Test Scenarios
Generic Scenarios (any service)
| Scenario | Description |
|---|---|
constant | Fixed number of virtual users for a set duration |
rampup | Gradually increase users from 0 to max |
spike | Sudden spike to max users, then drop back |
stress | Step-by-step ramp to find breaking point |
.NET API Scenarios
| Scenario | Description |
|---|---|
dotnet-items | GET /api/items with pagination — simulates read traffic |
dotnet-crud | GET + POST + PUT cycle — simulates full CRUD operations |
dotnet-mixed | All endpoints mixed — simulates realistic production traffic |
dotnet-stress | Step ramp-up: 10 → 50 → 100 → 200 users — find limits |
Running a Test
- Go to http://109.199.120.120:9000
- Select a Scenario from the dropdown
- Set parameters (VUs, duration)
- Click Run
- Watch results in the k6 UI and Grafana
Understanding k6 Metrics
| Metric | Description | Good Value |
|---|---|---|
http_req_duration | Total request time (P95) | < 500ms |
http_req_failed | % of failed requests | < 1% |
http_reqs | Total requests sent | Higher = better throughput |
vus | Active virtual users | As configured |
iterations | Completed test iterations | — |
k6 Test Script (CRUD Scenario)
Viewing Results in Grafana
k6 results are streamed to Prometheus (via Prometheus remote write or statsd) and displayed in Grafana. During a test run:- Open Grafana → Coderz Stack Home or .NET API Full Stack
- Watch real-time:
- Request rate spike
- Response time increase
- Error rate
- CPU and RAM spikes on the server