It seems Gotham might get an infusion of new vigor:
Update (2018-06-04): The call for maintainers has been answered. Stay tuned.
It seems Gotham might get an infusion of new vigor:
Update (2018-06-04): The call for maintainers has been answered. Stay tuned.
How everyone think about this comparison ?
I have been using Rocket in production for a year, so I was curious how rocket stacked up in that benchmark. Apparently Rocket performs very badly and that is attributed to it using threads rather than async.
So curiosity led be to trying it myself. Sure enough Rocket did not look so good.
BUT, the up and coming version 0.5 of Rocket does use async, so I ran the benchmark against the Rocket master branch. Wow! Things look far better:
I got this for Rocket 0.5 (git master branch):
./wrk --latency -t4 -c200 -d8s http://127.0.0.1:8000
Running 8s test @ http://127.0.0.1:8000
4 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.04ms 1.32ms 116.27ms 97.70%
Req/Sec 41.98k 6.00k 87.86k 78.57%
Latency Distribution
50% 0.91ms
75% 1.27ms
90% 1.65ms
99% 3.17ms
1345533 requests in 8.10s, 186.06MB read
Socket errors: connect 0, read 60, write 0, timeout 0
Requests/sec: 166018.24
Transfer/sec: 22.96MB
And this for Actix 0.1.0:
./wrk --latency -t4 -c200 -d8s http://127.0.0.1:8080
Running 8s test @ http://127.0.0.1:8080
4 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.51ms 5.72ms 126.48ms 96.17%
Req/Sec 52.35k 24.34k 147.86k 73.50%
Latency Distribution
50% 390.00us
75% 765.00us
90% 1.89ms
99% 26.91ms
1672231 requests in 8.06s, 205.72MB read
Socket errors: connect 0, read 56, write 0, timeout 0
Requests/sec: 207447.99
Transfer/sec: 25.52MB
That is a pretty huge boost in performance for Rocket. This async thing really does seem to work!
Rocket is still a bit down compared to Actix but they are close enough that I'm not having to ever think about changing over. No doubt there will be some further tuning of Rocket before the v5 release as well.
Interestingly the 99% outliers in latency are massively longer for Actix. I ran it many times. Curious.
Anyway, that benchmark is pretty rude and crude. A micro-benchmark that only measures the speed of serving "Hello world" from a static string.
Which testing for rocket version 0.5 async?
Sorry, I inadvertently labeled both my results as "actix". In fact the first was Rocket and the second was Actix. I fixed the post now.
By the way, I had no luck following the Rocket master branch installation instructions to use:
[dependencies]
rocket = "0.5.0-dev"
Instead I used the git master branch:
rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master" }
Which is claimed to be "rocket v0.5.0-dev" as Cargo compiles it.
This topic was automatically closed after 6 days. We invite you to open a new topic if you have further questions or comments.