4 ms·
I think this is really cool. For simple stuff where you just want light and fast, it's good to see an ASM rewrite.
by stochastimus 7y ago
I think this is really cool. For simple stuff where you just want light and fast, it's good to see an ASM rewrite.
- theamk 7y agoLight? Sure Fast? Nope. Look at http_write_response for example - it does 5 syscalls instead of 2 required. And there is no caching headers support, so the browser will download things more than necessary. For simple things, I highly recommend a small C-based server. This server has educational value only.
- rkeene2 7y agoCheck out "filed" [0] for a small C webserver that does a lot to be fast. [0] http://filed.rkeene.org/ http://filed.rkeene.org/
- Hydraulix989 7y agoOne thread per request doesn’t scale and becomes inefficient once there are too many requests because of the context switching.
- vbsteven 7y agoThis depends on the scenario. Before the async revolution most app servers were using this model and I’m sure that a very significant portion of the current internet is served with this model. It may not be the fastest in all cases but I still find it way easier to build something with this model than with async-everything.
- Hydraulix989 7y agonginx is impressively efficient. Compared to Apache, they did a lot of tricks to optimize their HTTP request parsing code. Their concurrency model is brilliant.