Performance#
QuizBase is built and load-tested as a developer-grade API. This page lists the measured numbers, the methodology behind them, and how we keep them honest.
All figures below come from k6 load tests against production (
quizbase.runriva.com) on 2026-11-10, after a round of infrastructure and performance work. We re-run baseline + spike scenarios quarterly and after significant changes. Since 2026-08-04 no API response is served from a CDN edge cache (every request carries an API key and is handled by the API itself), so these numbers are end-to-end. Latest raw output: k6-baseline-2026-11-10.json.
Service Level Objectives#
Measured over a full 5-minute sustained run at 50 RPS (15,002 requests, 0 errors). Figures are client-side, measured over the public internet from a client in Poland — roughly 50ms of each number is network round trip; your latency depends on your distance to the EU region.
| Metric | Target | Measured (2026-11-10) |
|---|---|---|
| p95, discovery endpoints (categories/stats/tags…) | < 200ms | ~65ms |
| p95, questions browse + PK lookup | < 500ms | ~70ms |
| p95, random (randomized sampling, heaviest) | < 800ms | ~120ms |
| Error rate (sustained 50 RPS) | < 1% | 0% (0 / 15,002) |
| Sustained throughput | 50 RPS | 49.9 RPS (15,002 requests) |
| Uptime | 99.9% | Live status |
x-performance extension on every operation in the OpenAPI spec reports the same numbers per-endpoint — machine-readable for your monitoring or SDK telemetry.
Per-endpoint performance#
Sustained 50 RPS for 5 minutes (60% public discovery / 30% browse / 10% random + PK lookup), 15,002 requests measured. Mix matches realistic API usage — most clients are discovery/browse, fewer random pulls, fewest PK lookups.
| Endpoint | p50 | p90 | p95 | Sustained RPS |
|---|---|---|---|---|
| GET /api/v1/categories | 53ms | 59ms | 61ms | 50 |
| GET /api/v1/stats | 55ms | 60ms | 63ms | 50 |
| GET /api/v1/topics | 53ms | 59ms | 63ms | 50 |
| GET /api/v1/tags | 53ms | 59ms | 63ms | 50 |
| GET /api/v1/subcategories | 53ms | 59ms | 65ms | 50 |
| GET /api/v1/questions | 57ms | 64ms | 67ms | 50 |
| GET /api/v1/questions/random (broad) | 97ms | 111ms | 119ms | 50 |
| GET /api/v1/questions/:id | 54ms | 59ms | 63ms | 50 |
Numbers are client-side over the public internet (TCP + TLS + network RTT included), so they are an upper bound on what the API itself spends. /v1/me, /v1/usage, /v1/languages, /v1/topics/:slug, /v1/report are not part of the load mix (small payloads, low-traffic endpoints) but stay within the same SLO tiers.
Spike & burst#
Spike and burst scenarios run as part of the periodic suite to verify behavior under traffic bursts (2026-11-10, same mix):
| Scenario | Requests | Errors | p95 (discovery / browse / random) |
|---|---|---|---|
| Spike 50→100→50 RPS | 9,375 | 0% | ~125ms / ~125ms / ~170ms |
| Burst 50→200→50 RPS | 8,500 | 0% | ~70ms / ~70ms / ~115ms |
| Headroom check, 400 RPS for 30 s | 16,500 | 0% | ~70ms / ~70ms / ~120ms |
Methodology#
- Tool: k6 v2.3.0 (Grafana),
constant-arrival-rateandramping-arrival-rateexecutors. - Scenarios: baseline (50 RPS / 5 min), spike (50→100→50 RPS), burst (50→200→50 RPS), narrow filter (30 RPS / 3 min).
- Mix: 60% public discovery / 30% browse / 10% random + PK lookup — weighted to realistic API usage.
- Target: production (
quizbase.runriva.com), EU region, warmed up before measuring. All load comes from one client IP, so the per-IP limit is switched off for the test window and the key has no plan limit — the numbers reflect end-to-end request handling rather than the limiter. Measured client-side over the public internet.
Quarterly drift mechanism#
We re-run pnpm load:baseline + pnpm load:spike quarterly. Each run produces a fresh k6-baseline-DATE-summary.json and updates the per-endpoint x-performance block in openapi.json. If p95 regresses by more than 1.5× vs the previous run we investigate before marking the new run as the baseline (deployment, dependency upgrade, data growth, query plan change).
The lastMeasured field on every x-performance block is the date of the last successful baseline.
Raw data#
For skeptics and benchmarkers: k6-baseline-2026-11-10.json — full k6 summary metrics (median/p90/p95 per endpoint, throughput, request counts). Aggregates only. Previous runs: 2026-05-30, 2026-05-27.
See also#
- API Reference — interactive Scalar render of the spec.
- /openapi.json — OpenAPI 3.1,
x-performanceper operation. - Errors and retries — what
429looks like and how to back off. - Rate limits in practice — pacing strategies that keep you under 429.