Menu

axum vs actix-web vs Rocket on 1 CPU and 1 GB RAM
📰

axum vs actix-web vs Rocket on 1 CPU and 1 GB RAM

DEV Community: rust·Zubair·14 days ago
#FSnDgKgY
#devtorust#devto#dev#axum#connections
Reading 0:00
15s threshold

TL;DR: I wrote the same Todo API in axum, actix-web and Rocket, then load tested each one in Docker with 1 or 2 CPU cores and 1 GB of RAM. On one core, actix served about 67k requests per second, axum 47k and Rocket 34k. Each server idled at about 1 MB of RAM. I then re-ran it on two AWS spot instances in Mumbai, a c7i.xlarge for the server and a c7i.2xlarge for the load generator, and got the same ranking over a real network. Before any of that, review found a bug in my axum version that let one bad request take the whole server down, and two settings that would have made the benchmark unfair. Code and full results: github.com/2u841r/actix-vs-axum-vs-rocket .

Why

Every "Rust web framework benchmark" I find runs on a 64-core machine and reports millions of requests per second. That tells me nothing. The servers I actually pay for have 1 or 2 vCPUs and 1 GB of RAM.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.