Total.js Platform
Total.js Platform

Total.js Platform news and tutorials

Benchmarking Node.js Frameworks: selecting your framework for 2025!

Benchmarking Node.js Frameworks: selecting your framework for 2025!

In web development nowadays, picking the right framework can feel like choosing the perfect engine for a journey. As users demand lightning-fast interactions, it’s no longer just about building applications; it’s about crafting experiences that can scale effortlessly. Node.js frameworks have come a long way, from the simplicity of Express to the specialized efficiency of Total.js and Koa. Each framework addresses a different aspect of web development, whether it’s raw speed, scalability, or ease of use.

In this post, we’ll compare top frameworks through a series of benchmarks, sharing insights on performance and speed. With the results in hand, we’ll take a closer look at Total.js and why it’s worth considering in today's web driven request handling speed.


The Purpose of Benchmarking

Performance in web applications is more than a luxury. It’s a necessity. As applications grow in complexity, users have little patience for delays or latency, with studies showing that even a second’s delay can reduce customer satisfaction. For developers, fast response times directly correlate with server efficiency, resource management, and cost-effectiveness. In a high-performance application, every millisecond counts, especially in applications with high traffic or intensive data processing requirements. Benchmarking frameworks on speed becomes an essential step in guiding framework selection.

The Frameworks in This Analysis

This benchmark comparison focuses on a range of popular and up-and-coming Node.js frameworks:


This analysis showcases the performance of these frameworks in side-by-side benchmarks, revealing each framework's strengths and weaknesses in terms of speed, request handling, and latency.

Benchmarking Methodology

Hardware and Testing Environment

All benchmarks were conducted on an iMac Intel Monterey with 12GB RAM, running Node.js v21. Using this consistent setup allowed us to standardize results across all frameworks.

Testing Approach

We used wrk to simulate a high-concurrency environment with the following command:

Each framework handled requests for 5 seconds with 8 concurrent connections and 2 threads, simulating real-world application performance under load.

Metrics Considered

In addition to raw speed, we considered:

  • Requests per Second – Measures how many requests each framework can handle per second.
  • Transfer Rate – Amount of data transferred per second.
  • Average and Maximum Latency – Indicates how quickly each framework responds under pressure.

Performance Results

The table below presents the updated benchmarking results:

RankFrameworkRequests/secTransfer/secAvg LatencyMax Latency
1Koa10,704.041.80MB0.95ms49.29ms
2Hapi7,685.381.63MB1.15ms34.87ms
3Total.js v47,494.292.39MB21.83ms499.69ms
4Total.js v57,010.061.45MB1.02ms34.95ms
5Express3,482.35812.78KB2.54ms56.24ms
6Fastify3,011.74520.58KB5.92ms91.93ms
7Nest.js2,764.15534.47KB3.18ms55.42ms
8Sails.js672.70246.53KB12.55ms144.24ms
9Meteor248.572.09MB34.17ms217.16ms

Test it Yourself

Want to see how these frameworks perform firsthand? Download the benchmarking setup from the link below, unzip the package, and follow the instructions in the video to run the tests on your local machine.

Download Benchmarking Setup

This setup will walk you through benchmarking each framework so you can get a feel for their real-world performance. Happy testing!

Key Observations and Insights

  • 1. Koa Leads in Requests per Second: With a peak of 10,704 requests per second, Koa demonstrated the highest performance in terms of throughput and lowest average latency, making it ideal for high-concurrency applications.
  • 2. Total.js Versions 4 and 5 Show Balance: Total.js v4 and v5 offer competitive speeds, with 7,494 and 7,010 requests per second, respectively. With low average latencies (21.83ms for v4 and 1.02ms for v5), Total.js stands as a balanced option, especially with v5 showcasing lower latency and an impressive 1.45MB transfer rate.
  • 3. Express and Fastify—Popular, but Middle-Tier Performance: Express and Fastify, while popular for their ecosystem and flexibility, fell in the middle range, with lower requests per second (3,482 and 3,011) and higher latencies.
  • 4. Feature-Rich but Slower Frameworks: Sails.js and Meteor offer extensive features but performed slower, with 672.70 and 248.57 requests per second, respectively. These frameworks may be suitable for applications where raw performance is less critical than feature sets.
  • 5. Nest.js—Flexibility at a Cost: With 2,764 requests per second and a relatively high latency, Nest.js provides extensive abstraction layers but sacrifices some performance, making it ideal for complex applications that can tolerate slight performance overhead.

Total.js

  • Balanced Performance

Total.js consistently performed well, especially in its latest v5 iteration. With 7,010 requests per second, low latency, and minimal dependencies, Total.js achieves a balance between speed and modularity. While it may not dominate the spotlight, Total.js offers a compelling blend of modularity and performance that could make it a valuable choice for developers seeking efficiency and flexibility in a single package.

Peter Sirka, the founder of Total.js, commented on the results, acknowledging the trade-off between performance and the extensive features of the framework:

"That's OK... Total.js has more features implemented in the web server than Koa. That's logically going to reduce performance. But the numbers are still..."

This perspective highlights the balance Total.js strikes between providing a rich feature set and maintaining competitive performance, reinforcing its value proposition for developers seeking versatility without compromising on speed.

  • A unique design approch

Total.js stands out in the Node.js ecosystem with its unique approach, shaped by a decade of dedicated development (since 2013). Known for being an "all-in-one" solution, Total.js is designed entirely in pure JavaScript without relying on external dependencies—a rarity among modern frameworks. This design reflects a strong commitment to Elon Musk’s "first principles" approach, where every aspect of web development is broken down to its fundamentals to ensure each component serves a true purpose.

This philosophy by means that Total.js avoids the conventional trend of integrating third-party libraries as dependencies. Instead, the developers of total.js have crafted every module from scratch, rigorously analyzing if existing norms in web development truly make sense or if they simply follow popular conventions. This emphasis on minimalism and independence gives Total.js a unique level of efficiency, stability, and control, making it one of the most optimized choices for high-performance, maintainable applications.

Conclusion

This benchmarking comparison reinforces Total.js's position as a strong contender in the Node.js ecosystem. While it may not have the lowest latency of Koa, Total.js offers an impressive mix of performance and features, with low dependency requirements and high throughput, making it a reliable choice for performance-focused applications.

Want to join the Total.js community?