Skip to content

feat(observability): k6 load test suite for critical paths #176

Description

@chitrank2050

Problem

No performance baseline exists. We don't know how many requests/second the system handles, where it bottlenecks, or what happens under load.

Proposed solution

Create k6 test scripts for critical paths:

  1. Auth flow: login → use token → refresh → logout (50 VUs, 5 minutes)
  2. Usage ingestion: batch of 10 events per request (100 VUs, 5 minutes)
  3. Entitlement check: GET /entitlements/api_calls/check (200 VUs, 5 minutes — this is the hot path)
  4. Invoice generation: generate + finalize (10 VUs, 2 minutes)
  5. Mixed workload: realistic traffic distribution across all endpoints

Each test records: requests/sec, latency p50/p95/p99, error rate, throughput.

API design (if applicable)

N/A — k6 test scripts in tests/load/ directory.

Alternatives considered

  • Artillery — acceptable alternative. k6 is more widely used and has better Grafana integration.
  • JMeter — rejected. XML configuration is painful. k6 uses JavaScript.

Additional context

Tests run against Docker Compose stack. Results exported to Grafana for visualization.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions