Skip to content

Improve load testing: replace/repair loadtest.sh with a reliable harness #3

Description

@aplgr

Goal

Provide an easy, reliable way to run load tests locally against the stack.

Why

The service involves rate limiting + auth + Chrome rendering. Load tests are the fastest way to surface concurrency issues, leaks, and throttling behavior.

Scope

  • Keep scripts/loadtest.sh as entrypoint, but make it robust:
    • config via env/flags: base URL, duration, rate, concurrency, endpoint (HTML vs URL), output report file
    • optional API key / token input (separate token for higher limits)
    • handle 429 gracefully (count + backoff) instead of failing immediately
    • print summary: total requests, success rate, 4xx/5xx breakdown, p50/p95 latency (if tool supports)
  • Recommended: use a standard tool (Vegeta / hey / k6), either:
    • bundled via Docker image, or
    • auto-detect installed binary and fallback to curl-loop.

Acceptance criteria

  • ./scripts/loadtest.sh runs end-to-end on a fresh clone (after make start)
  • Produces a deterministic, readable summary
  • Works in both “public/no-key” mode and “API-key” mode

Notes / hints

Document recommended test token settings so contributors don’t accidentally DDoS the service with public limits.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions