Back to Projects

LoadForge

BUILDING

Self-hosted API load testing with real-time performance metrics and AI-assisted bottleneck diagnosis.

LoadForge

Overview

LoadForge brings enterprise-grade load testing to a self-hosted environment. It orchestrates k6 load generators via distributed BullMQ workers, capturing live telemetry and storing it in PostgreSQL. After a run, an integrated AI layer analyzes the time-series data to diagnose bottlenecks, identifying whether the issue lies in connection pooling, DB locks, or application logic.

Architecture

01 — Next.js Console
Test configuration & live dashboard
02 — Backend API
Fastify service for test coordination
03 — Redis / Job Queue
BullMQ test scheduling
04 — Worker
Job consumption & container execution
05 — k6 Load Generator
Subprocess high-throughput load generation
06 — PostgreSQL Metrics Store
Time-series result persistence
07 — AI Diagnosis
Post-run bottleneck analysis

Why I built this

Every load testing tool I tried was either too heavy — enterprise software requiring days of setup — or too light — a shell script that hits a URL and returns average latency. I wanted something that you could self-host in minutes and that gives you real, production-quality signal about what breaks under load and why.

Engineering Challenges

  • Subprocess orchestration and preventing zombie k6 processes on worker crash
  • Managing massive influxes of time-series data during high-throughput tests
  • Queue recovery and state management during Redis node restarts

What I learned

Spawning native subprocesses requires robust defensive programming around signal handling and stream piping.

AI evaluation of time-series data requires summarizing metrics into statistical percentiles before prompting, rather than sending raw points.

Stack

TypeScriptTypeScriptNext.jsNext.jsFastifyRedisRedisBullMQPostgreSQLPostgreSQLDrizzlek6DockerDocker