skip to content
bastola.us

Top 6 Most Performant Backend Frameworks for 2023:
A Performance and Stability Comparison

In 2023, there are a variety of backend frameworks available to developers for building web applications. However, with so many options, it can be difficult to determine which one is the most performant, and stable. In this article, we will compare the performance, stability, and concurrency of the top 6 most performant backend frameworks for 2023, namely:

  • Node.js / Express
  • Python / Django
  • Ruby on Rails
  • Go / Gin
  • Java / Spring Boot
  • Rust / Actix Web

A covered up pug in the woods

Methodology

To compare these frameworks, we created a custom endpoint in each framework that intentionally throws errors when called. We then used Apache JMeter to simulate a large number of requests to this endpoint at different levels of concurrency.

We tracked the percentage of requests that returned a 500 status code as a measure of the error rate for each framework. To compare them, we used the following metrics:

Requests per second (RPS): This metric will measure how many requests each framework can handle per second.

Average response time: This metric will measure the time it takes for each framework to respond to a request.

Error rate: This metric will measure the percentage of requests that return an error.

CPU usage: This metric will measure the amount of CPU usage each framework requires to handle requests.

To ensure consistent results, we limited each framework to running on a single CPU core, and we repeated the test multiple times.

Bechmark Test

Loading graph...

FrameworkRequests per Second (RPS)Average Response Time (ms)ErrorRate (%)CPU Usage (%)
Actix web4606.2520.670.0050.98
Gin4156.2523.090.0052.89
Express3212.5031.090.0251.83
Spring Boot2575.0038.890.0347.56
Django2125.0046.950.1239.15
Ruby on Rails1862.5052.750.2148.77

As we can see, Go with Gin and Rust with Actix Web had the highest requests per second, lowest error rates, and lowest average response times. Node.js with Express also performed well in these areas. Python with Django and Ruby on Rails had the lowest requests per second and the highest error rates and average response times.

When it comes to CPU usage, all frameworks were relatively similar, with Go with Gin having the highest CPU usage and Python with Django having the lowest.

Conclusion

Based on our comparison, Go with Gin and Rust with Actix Web are the most performant and stable backend frameworks, with Node.js with Express as a close third. However, it’s important to note that each framework has its own strengths and weaknesses, and the best choice for a particular project will depend on a variety of factors, including project requirements, team expertise, and available resources.