The fastest Rust backend web framework in 2024

Mayank Choubey
Tech Tonic
2 min readFeb 19, 2024

--

In this article, we’ll try to find the fastest Rust backend web framework using a simple ‘Hello <uuid>’ case. This is slightly different from the classic ‘Hello World’ with added randomness in each response. We’ll be comparing the following frameworks: Rocket, Actix, Axum, Warp, and Gotham. Let’s get started.

Test setup

All tests are executed on MacBook Pro M2 with 16G RAM & 8+4 cores. The rust version is 1.76.0. The load tester is Bombardier. The application code is as follows:

All the rust apps have been built in release mode.

Results

Each test with 300 concurrent connections is executed for 10M requests. A 1K request warm up is provided before taking readings. The results in chart form are as follows:

Verdict

There is hardly any noticeable difference between the frameworks. However, for RPS, Rocket is the fastest & Actix is the slowest. Rocket’s CPU usage is pretty high, Actix’s CPU usage is the lowest.

Winner: Rocket (ignoring CPU usage)

Thanks for reading this article!

--

--