4 ms·
I evaluated a few different Rust web frameworks, where performance was the deciding factor. A minimum viable echo server was put through its paces with `h2load`
by jason_oster 8y ago
I evaluated a few different Rust web frameworks, where performance was the deciding factor. A minimum viable echo server was put through its paces with `h2load` on a relatively recent MacBook Pro. `actix-web` was literally 100x faster than the next fastest competing framework.
The benchmark result really confused me. But you'll find that the `actix` actors are extraordinarily lightweight and highly optimized around the equally lightweight and highly optimized Futures. The design is hard to beat, from a performance standpoint.
- madsohm 8y agoHave you tried to create a more complex web page and have the web frameworks render that as well? Sometimes being the fastest at the most trivial request isn't enough, if it can't handle complex request fast as well. Also, do you have a list of speeds for the frameworks you've tested?
- steveklabnik 8y agoA lot of Rust frameworks use sync io. The first generation does because the libraries for async didn't exist yet, and Rocket doesn't because (last I heard), the author said that he didn't feel the ergonomics were there yet, and that's one of Rocket's primary goals. So that leaves Actix, Gotham, and Shio, basically. Gotham hasn't been tuned for performance at all. I haven't seen any Shio benchmarks. There are a lot though: https://github.com/flosse/rust-web-framework-comparison#server-frameworks https://github.com/flosse/rust-web-framework-comparison#serv...
- fafhrd91 8y agoFrom repo activity Shio seems dead. And here is for gotham https://gotham.rs/blog/2018/05/31/the-state-of-gotham.html https://gotham.rs/blog/2018/05/31/the-state-of-gotham.html
- steveklabnik 8y agoYeah, that Gotham news happened after I made this comment. Good to know!
- simooooo 8y agohttps://www.techempower.com/benchmarks/previews/round16/ https://www.techempower.com/benchmarks/previews/round16/ Very fast for plaintext but not as impressive when db queries are involved, i.e. the "fortunes" test