For over a decade, Node.js and Express have been the default foundation for server-side JavaScript and TypeScript web APIs. However, modern workloads—real-time event streaming, high-frequency IoT ingestion, and high-concurrency microservices—often hit performance bottlenecks caused by Node's V8 JIT startup times, non-trivial memory baselines, and legacy HTTP parser overhead.
The emergence of Bun (written in Zig and powered by Apple's JavaScriptCore engine) and ElysiaJS (an ergonomic, end-to-end type-safe web framework built natively for Bun) offers a compelling alternative.
Here are the results of our real-world, high-concurrency benchmark testing.
The Test Environment & Methodology
Benchmarks were conducted on an isolated bare-metal node to eliminate cloud hypervisor CPU-stealing and noisy-neighbor interference:
tcp_tw_reuse=1, somaxconn=65535).wrk running on a separate dedicated node over direct 10GbE DAC cabling.The Target API Endpoints
Each framework implemented an identical business logic endpoint:
Benchmark Results & Performance Deltas
1. Throughput (Requests Per Second — Higher is Better)
| Concurrency Level | Node.js 22 + Express 4.x | Bun 1.1 + Elysia 1.0 | Throughput Delta |
|---|---|---|---|
| 100 Connections | 18,420 req/sec | 74,180 req/sec | +302% (4.0x) |
| 500 Connections | 21,150 req/sec | 118,400 req/sec | +459% (5.5x) |
| 1,000 Connections | 19,800 req/sec | 126,850 req/sec | +540% (6.4x) |
| 5,000 Connections | 16,300 req/sec | 112,400 req/sec | +589% (6.8x) |
2. Latency Distribution at 1,000 Concurrent Connections
50.4 ms142.8 ms384.2 ms7.8 ms18.2 ms41.6 ms3. Cold Start & Idle Memory Footprint
Why is Bun + Elysia So Much Faster?
The performance gains come from three specific architectural differences:
Code Comparison: Clean Type Safety
Beyond raw performance, Elysia provides compile-time and runtime type inference with zero code duplication:
import { Elysia, t } from 'elysia'
export const app = new Elysia()
.post('/api/checkout', async ({ body }) => {
// body is strongly typed at compile time and validated at runtime
return {
status: 'confirmed',
orderId: crypto.randomUUID(),
total: body.quantity * body.unitPrice,
}
}, {
body: t.Object({
sku: t.String(),
quantity: t.Number({ minimum: 1 }),
unitPrice: t.Number(),
})
})
.listen(3000)For teams building new high-throughput microservices or high-velocity event APIs, Bun and Elysia deliver substantial infrastructure cost savings and superior user-facing response times.