4 ms·
The 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
by sanderjd 12y ago
The 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