volution / kawipiko

kawipiko -- blazingly fast static HTTP server -- focused on low latency and high concurrency, by leveraging Go, `fasthttp` and the CDB embedded database
396 stars 10 forks source link

Benchmark comparison with H2O #5

Closed osevan closed 2 years ago

osevan commented 2 years ago

H2O Webserver got same usecase.

Could you benchmark http 1.0 without ssl each other?

https://github.com/h2o/h2o

Thanks and

Best regards

cipriancraciun commented 2 years ago

The problem with benchmarks is that they're complicated and especially time consuming to correctly make. For example:


Thus, although it would be tempting to benchmark against H2O, or any other high-performance server, it is a very time consuming operation, time that would be perhaps better spent improving my software. :)

So, if you can provide me with a proper scenario, accompanying example data and configuration file, if I have the time, I might do it.


To put things into perspective another way: I've just looked at Cisco's small-business switches and chosen the "best one" in that category, the "Cisco Business 350 Series"; assume you have a small data-center where you deploy the following: your Cisco switch, a router, and a web server; that Cisco switch is rated at ~14 million packets per second (at 64 bytes).

So doing some simple math: each request / response requires a minimum of 2 IP packets (I will assume that one uses TCP FastOpen, and that the request fits in one packet, and the response the same); then each of those packets has to pass through the switch twice (internet -> router, then router -> server); now taking the packets per second rating and halving that (because only the TCP+IP overhead is ~40 bytes which would leave only 24 bytes for the actual HTTP request), then halving that for the request / response, then halving that due to the two hops mentioned above yields around ~1.75 million packets per second.

My benchmark of Kawipiko on my laptop (with a single thread) (with other stuff running around) puts it at ~100K requests per second, thus ~200K packets per second, that is around 1/9 of the switch capacity. Thus with one or two modest desktops I would quickly saturate the capacity of the switch to do its job, let alone any bandwidth limitations or routing.

So, based on this train of thought I would say Kawipiko is good enough. :)