Define SLIs and thresholds
Medium70 pts~25 min
- SLIs
- SLOs
- Thresholds
Practice app · Checkout Service
A load-testable checkout service with realistic latency that degrades under concurrency, plus a live metrics view.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Define latency, error-rate and correctness SLIs for checkout and enforce them as thresholds.
Your task
- 1Set options { vus: 5, iterations: 50 }.
- 2thresholds: 'http_req_duration': ['p(95)<600'], 'http_req_failed': ['rate<0.01'], 'checks': ['rate>0.99'].
- 3GET BASE_URL + "/perf/checkout" and check status 200 and body status === "confirmed".
Acceptance criteria
- GET /perf/checkout returns 200
- Latency and error-rate thresholds are declared
- ≥ 50 requests with error rate < 1%
- At least 50 check() calls pass
k6 load testing · SDET · Workload modelling