I am here again,
few days back i started development in Rocket, but now i am finding that Actix is extremely fast framework, the only thing i am looking for speed and community support.
community support i can see you guys are very helpful here, i am very lucky to jabe you guys, but unfortunately i did not find much videos or tutorials about Rocket on the internet like youtube or stack overlfow, so now i am left with speed attribute of framework.
help me guys to decide which one is faster one, i dont need much computation, only retrieve and server text.
images i will be fetching from Cloudflare r2
According to this benchmark actix (in any form benchmarked -- highest place: 7; lowest place: 169) is faster than rocket (place: 439).
Hmm, while I don't necessarily disagree I'd love to know what metric you use to judge popularity. Whenever I consider the popularity of a crate I look at the downloads on crates.io and github stars. Axum has a few downloads more, but actix-web has considerably more github stars.
I think the comments on this thread should make it clear why I think axum is more popular: link.
Actix-web has been around for a lot longer than Axum, so its not surprising that actix-web has more stars than Axum. The fact that Axum has just as many downloads really shows how much faster it is growing than actix-web.
@alice I am yet to go through all the comments on link you gave but got a general idea that Axum is good for maintaining complex code, do you have any link for confirming that it is faster than Actix , that will be very helpful for me.
I know multiple factor decides speed but i needed a general picture on that
I usually just look on lib.rs. Because crates.io offers two numbers, both misleading: total number of downloads (which favors projects which are older) and number of downloads for certain version (which favors projects which are releasing new versions rarely).
On lib.rs you can see number of download in last month. Which is also unfair number (because it inflates numbers for Axum slightly) but difference between 1.4M for Axum and 464K for Actix is too large to explain just by that effect.
I actually read this comment from the reddit thread @alice shared and now I'm not so sure if I should've shared the link in the first place. I really don't know anything about the benchmark other than that it is quite popular and linked by projects that perform well in that benchmark, like actix-web or salvo, another Rust web framework. All I can say from my experience doing web development in Rust using actix-web is that the framework was never the bottleneck so far and my database queries/third party api requests/bad caching were always the reason why users were unhappy with me, because they had to stare at the loading screen for too long
I am totally agree with you, database layer is something that stop all our thinking efforts, no wonder big companies like google years ago came with with their own solution like big table (not sure how fast it is but may be they are trying to cut down unnecessary default overload that comes in relational database like mysql) third party as you said till now no experience in that first time will be using Cloudflare R2 for images so hoping for best performance as it is getting newly launched)
Also I got very good help with my noob questions about Rocket here.
Oh, and the developer seemed like a fine chap.
Admittedly I did not know of any others. Except Actix but at the time the Actix developers were having some kind of argument ant the original developer threatened to take the code off line and quit the project. Hopefully things have settled down in Actix world since then.
As for speed, the benchmark results are so vastly different that I'm pretty sure something is up with the Rocket version. Also the recent version 5 of Rocket is async with the Tokyo run time. I see no reason why it should test so slowly there. Sadly no time to investigate further.
Indeed -- I saw some talk about it on the official Rocket channel on Matrix somewhat recently. Apparently the Rocket benchmarks were originally written by someone who just wanted the tests to pass, but didn't care about whether the code was fast, or even idiomatic. IIRC the person who brought it up had fixed one of the tests, but apparently there's more to be done.
I have no idea what the row was about. I. guess it could have been the end of Actix if the original developer quit and pulled the code and/or if there were no/insufficient skilled and enthusiastic developers to pick it up and run with it.