Recently, I conducted a performance benchmark on four backend frameworks β Express,
Fastify, Brahma-JS (my own creation), and uWebSockets.js
(uws-js). The tests were conducted using autocannon
directly against each
live-deployed API on a minimal EC2 t2.micro instance.
autocannon
is a Node.js-based HTTP benchmarking tool, similar to wrk
, designed to
generate high levels of concurrent requests.Surprisingly, Express ended up as the lowest performing candidate, while Fastify was slightly better. Brahma-JS performed impressively, though uWS remained the fastest overall.
Git: https://github.com/expressjs/express
Express is well known for its simplicity, but it's not optimized for high concurrency or raw performance.
π Results: 54k requests, ~3k failed (timeouts)
Git: https://github.com/fastify/fastify
Fastify is a performance-focused alternative to Express. It showed a solid improvement over Express.
π Results: 307k requests
Git: https://github.com/Shyam20001/rsjs
Brahma-JS is my own minimalist, high-performance Node.js framework. It uses a lean architecture and async primitives. It performed impressively, close to uWS.
Rust Tokio
(async runtime) + Hyper
(HTTP engine)Express/Hono
while staying minimal
π Results: 413k requests
Git: https://github.com/uNetworking/uWebSockets.js
uWS is known for being one of the fastest web frameworks out there β built in C++ with Node.js bindings. Its performance remains stellar, though its ergonomics arenβt as friendly as others.
π Results: 456k requests
This test proves that raw performance isnβt always about using the most popular tool β thoughtful design and
minimal overhead in frameworks like Brahma-JS or uWS can bring massive benefits in constrained environments like
t2.micro
.
Get started instantly with the NPM package:
npm i brahma-firelight
π Explore on NPM
Drop a star on the Brahma-JS GitHub repo if you're curious about its design or want to try it out!