5 ms·
The benchmarks are a bit lower than we wanted. I think this is mostly due to an immature ecosystem for doing basic http - working off of c bindings to a proven,
by jonreem 12y ago
The benchmarks are a bit lower than we wanted. I think this is mostly due to an immature ecosystem for doing basic http - working off of c bindings to a proven, fast framework would probably speed this up by a few times.
- mercurial 12y agoIt does sound odd that you compare your framework to NodeJS framework. Comparing to Java frameworks (a fast language which can do both parallelism and concurrency) would be much more relevant.
- jonreem 12y agoTo be honest, it's mostly because that's what we had experience with.
- sanderjd 12y agoThe comparison with Go is really interesting because I don't think its http server does anything particularly fancy (like calling across FFI to non-Go code) and I don't see any obvious bottlenecks in rust-http that would cause an order of magnitude less throughput. Would be interesting to see some profiling.
- ben0x539 12y agoAs far as I can tell (and have been told), rust-http starts a new task (thread, here, really) for every request. Edit: but see https://news.ycombinator.com/item?id=7978299 https://news.ycombinator.com/item?id=7978299
- oscargrouch 12y agoMaybe redesign it to start some thread early, and put them in a pool.. then dispatch to them.. i think i've saw a thread pool already backed in rust std or in servo.. dont recall right.. i think servo even have a fancy work stealing thread pool.. Also the design of Nginx is sophisticated, because it uses the event io + a thread dispatch design.. (at least it was like this last time i've hacked it) and worth being copyied
- mercurial 12y agoBy the way, something is up with the server serving the static doc. The link to the docs is wrong, eg https://github.com/iron/router https://github.com/iron/router should link to http://docs.ironframework.io/router/ http://docs.ironframework.io/router/, instead of http://docs.ironframework.io/core/router http://docs.ironframework.io/core/router. To add insult to injury, http://docs.ironframework.io/core/router http://docs.ironframework.io/core/router returns 200 with an empty body instead of 404. That said, the framework itself looks interesting, though the 'iron/alloy/etc' terminology is a little bit of an annoyance.
- zzmp 12y agoThanks for the heads up. We reworked our folder structure after writing the READMEs, and it looks like we forgot to update. I'll get working on that. The 200 is being served as the default of `rust-http`. Static will never serve a 404 - it will only defer to the next middleware, and the docs server is overly simple, so it just goes to default.
- zzmp 12y agoThis should be fixed. Thanks again.