Show HN: Robyn – A fast, extensible async Python web server with a Rust runtime
github.com
github.com
There are two major benefits I can see from making public benchmarks: 1. showing which other projects you are competing with and 2. having a benchmark suite you keep an eye on helps you actually make your project fast.
Of course I agree that benchmarks can't tell the whole story, but they can demonstrate huge differences in potential performance which can give you a reason to create a realistic benchmark for your use case.
I suspect the reason these aren't "front and center" on the github readme is because the project is very early and many of their commits mention performance. Feature wise it seems reasonably mature but the release cycle is quite fast and they've made a few breaking changes. If I were them, I'd wait until I was near 1.0 before putting performance claims in front too.
The benchmark is here: https://sansyrox.github.io/robyn/#/comparison
I took a brief look into the internals and turns out it wraps actix web (https://github.com/sansyrox/robyn/blob/main/src/server.rs), one of the more dominant web servers on techempower.
tldr: I dont have a good reason to doubt the performance but seems pretty interesting if you want to use actix web without having to go through rust
The project is still in early stage and hence I don't show many comparisons.
Here is a benchmark on TechEmpower - https://www.techempower.com/benchmarks/#section=test&runid=4...
I also have a comparison on the docs website: https://sansyrox.github.io/robyn/#/comparison
And my own benchmark code is https://github.com/sansyrox/robyn-comparison-benchmarks
The Rust/Python toolchain and ecosystem are really impressive. They're not something I would have expected to have developed with as much quality as they have.
My guess is that "fastest" refers to the request-response loop.
I'd be interested in knowing how fast it is once you tack your favourite template rendering engine on top.
It would be nice if there were drop-in support for Tera, the Rust template engine that is inspired by Jinja2:
A lot of web development sees no real scale.
Here is a benchmark on TechEmpower - https://www.techempower.com/benchmarks/#section=test&runid=4...
I also have a comparison on the docs website: https://sansyrox.github.io/robyn/#/comparison
And my own benchmark code is https://github.com/sansyrox/robyn-comparison-benchmarks
Robyn - With Every Heartbeat (Live Nobel Peace Prize 2008)
>Written in Rust, btw xD
They'll tell you.
I think the value of having all your logic in the same language is undervalued (Ruby and Node also seem to often use bindings to something compiled).
Well there's one way to have both: just write all your logic in a language that compiles to native.
edit: here I'm biased because even if I used this project and would send a PR to it, I'm okay with doing it on either Python or Rust. But yeah, not every Python programmer can also code in Rust
But like another sibling said, if you want all in one language, write it all in the compiled language.
I use the Hyper library written in Rust, and write my code in Rust. One language, and a very nice one at that :)
Mostly ability to easily debug every part of your code. If your interpreter has a problem you are out of luck anyway, but there’s probably a reason you are using a scripting instead of compiled language.
Chris Seaton (RIP) gave a talk at RubyConf this year that talks about rewriting stdlib in Ruby for truffleruby. The difference is now jit seems to be powerful enough to produce good speedups. Recently some core MRI methods have been rewritten in Ruby and I wouldn’t be surprised as yjit becomes faster if more aren’t rewritten.
At the end of the day, it's still the case that the interpreter is written in an different language, though.
The closest thing I could find is this:
https://news.ycombinator.com/item?id=34002459
The tl;dr is: server requests-per-second is meaningless without realistic loads involving databases and other dependencies. Typically the external factors dominate request processing time.
There might be compelling reasons to spring for Robyn over Flask [0] or FastAPI [1] but RPS shouldn't be one of them.