This guide details the load testing procedures for JobFlow using the configured k6 script.
The load testing suite uses k6 to simulate concurrent users logging in, creating execution graphs (DAGs), and querying statuses.
The script is located at: backend/tests/load/k6-load-test.js.
The testing targets are divided into three validation limits:
- Low Load (10-20 Concurrent Users): Validates basic round-trip REST latency.
- Medium Load (50 Concurrent Users): Validates concurrent database connection pools and Redis queue enqueuing.
- High Load (100+ Concurrent Users): Measures worker scaling bottlenecks and maximum connection pool exhaust limits.
Ensure the target server is started:
# Production Compose stack
docker compose -f docker-compose.prod.yml up --build -dRun the load test directly from your local terminal pointing to the target URL:
k6 run -e API_URL=http://localhost:5000 backend/tests/load/k6-load-test.jsThe load test enforces the following service-level thresholds:
http_req_failed: Less than 1% error rate allowed.http_req_duration: 95% of requests must complete under 500ms (p(95) < 500).
- Throughput: Transactions completed per second (RPS).
- Request Latency: P50, P90, P95, and P99 latency values.
- Queue Wait Time: Delay between enqueuing and worker lock receipt.
- Worker Utilization: Capacity processing loads recorded in the worker dashboard.