3 ms·
This looks like an fun project, but I fail to see where it could be useful outside of a proof of concept. The focus is on the performance, yet "kawipiko is at
by idoubtit 4y ago
This looks like an fun project, but I fail to see where it could be useful outside of a proof of concept.
The focus is on the performance, yet "kawipiko is at least on-par with NGinx". NGinx does require file open-read-close, but with the OS cache, I think the cost is very small. And Nginx is much more compliant, battle-tested and versatile. For example it can send the right pre-compressed file that suits the Accept-encoding header of the request, something that kawipiko does not support.
So I guess the selling feature is that the web server is just a single static executable. It's probably useful in some cases, but I can't imagine them, even for a doc server embedded in hardware.
- ciprian_craciun 4y agoBTW, I've just tried running Kawipiko on an Android tablet (ARM64) to export the same demo as available at the link in the repository, and it works great! In fact, benchmarking it over wireless + Wireguard with 128 concurrent connections yielded around ~2K requests/second and the overall CPU stayed under 1% (for the server process). (Granted the main issue was latency, but the average was well under 25 ms.) Thus for a portfolio site that you take with you at conferences / meetings it works very well.
- ciprian_craciun 4y ago[Kawipiko's author here] NGinx is great at what it does, however in order to get good performance out of it one must also be a master of its configuration knobs, and knowing all of their implications. For example while benchmarking NGinx I've observed quite different performance characteristics for simple patterns such as asking for `/some-folder/` that fallbacks to `/some-folder/index.html` vs explicitly asking for `/some-folder/index.html`. On the other hand with Kawipiko there aren't many configuration knobs; it is already tuned for a single particular use-case: serving static content for websites (with small resources). Also, a particular use-case where Kawipiko can shine over NGinx, is for a website with lots of small resources (as with my Leaflet tiles example). NGinx can't decide where those resources are placed on disk, thus the OS file-system caching and read-ahead can't help too much here. Meanwhile with Kawipiko, where everything is bundled together, it receives a lot of help from the OS in this regard. As with regard to the "battle-tested and versatile", Kawipiko uses <https://github.com/valyala/fasthttp https://github.com/valyala/fasthttp> as its HTTP engine, which itself is used in quite a lot of Go-based products, thus one could state that it's "battle-tested enough". :) With regard the "even for a doc server embedded in hardware", why don't you think Kawipiko is a good fit in that case? (In fact this was one of its main use-cases.)