A terminal-based HTTP load testing tool built with Node.js and TypeScript. Subscribes fake users at a controlled rate, then fires sustained parallel load while displaying a live dashboard with real-time metrics.
- Token bucket rate limiter — precise control over subscribe and request rates
- Parallel user simulation — each user runs an independent request loop
- Live terminal dashboard — refreshes every 10 seconds with RPS, latency percentiles, and error breakdown
- Connection pooling — uses
undiciPool for efficient HTTP/1.1 reuse - Zero crashes — all errors are caught and routed to the stats collector
- undici — high-performance HTTP client
- @faker-js/faker — realistic fake user generation
- TypeScript 5 + Node.js 20
npm installEdit src/config.ts:
export const config = {
subscribeRate: 10, // users subscribed per second
requestRate: 5, // requests per second per user
totalUsers: 100, // total users to create
targetUrl: 'http://localhost:3000',
subscribePath: '/subscribe', // POST endpoint for subscribe phase
endpoints: [
{ method: 'GET', path: '/users' },
{ method: 'POST', path: '/data' },
],
dashboardInterval: 10000, // dashboard refresh in ms
timeout: 5000, // request timeout in ms
};A minimal echo server is included for local testing:
node server.js# Build and run
npm run build
npm start
# Or run directly with ts-node
npm run devPress Ctrl+C to stop gracefully.
=== API Load Tester — 00:01:30 elapsed ===
Users 100 / 100 active
RPS 487 req/s
Latency p50: 42ms p95: 118ms p99: 340ms
Success 48,231 (98.2%)
Errors 876 total
└ timeout 412
└ 5xx 310
└ 4xx 154
- Subscribe phase — creates all users via faker.js, subscribes them to the target API at
subscribeRateusers/second. Logs inline progress. Blocks until all users are subscribed. - Load phase — each user fires requests in parallel at
requestRatereq/s, picking a random endpoint on each iteration. Runs until stopped.
src/
├── config.ts # Runtime configuration
├── userFactory.ts # Fake user generation (faker.js)
├── rateLimiter.ts # Token bucket algorithm
├── stats.ts # Metrics: RPS, latency percentiles, error counts
├── reporter.ts # Live ANSI terminal dashboard
├── index.ts # Entry point — orchestrates phases
└── phases/
├── subscribe.ts # Subscribe phase logic
└── load.ts # Load phase logic