quizbase
Skip to content
Command Palette
Search for a command to run...
QuizBase · Docs

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.

MetricTargetMeasured (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 throughput50 RPS49.9 RPS (15,002 requests)
Uptime99.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.

Endpointp50p90p95Sustained RPS
GET /api/v1/categories53ms59ms61ms50
GET /api/v1/stats55ms60ms63ms50
GET /api/v1/topics53ms59ms63ms50
GET /api/v1/tags53ms59ms63ms50
GET /api/v1/subcategories53ms59ms65ms50
GET /api/v1/questions57ms64ms67ms50
GET /api/v1/questions/random (broad)97ms111ms119ms50
GET /api/v1/questions/:id54ms59ms63ms50

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):

ScenarioRequestsErrorsp95 (discovery / browse / random)
Spike 50→100→50 RPS9,3750%~125ms / ~125ms / ~170ms
Burst 50→200→50 RPS8,5000%~70ms / ~70ms / ~115ms
Headroom check, 400 RPS for 30 s16,5000%~70ms / ~70ms / ~120ms

Raw summaries: spike, burst.

Methodology#

  • Tool: k6 v2.3.0 (Grafana), constant-arrival-rate and ramping-arrival-rate executors.
  • 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#