This is a very basic benchmark suite to compare different HTTP server's performance. It is inspired by arcadius/java-rest-api-web-container-benchmark, but uses h2load instead of ab.
It works by running a predifined number of requests from a predefined number of concurrent clients against an HTTP server at localhost and measuring, among others, the execution time.
Currently, I included server implementations in Java (using Jersey with an embedded Grizzly server), Go (using net/http
) and NodeJS (once using plain http
package and again using the de-facto standard Express framework). All implementations are very basic REST APIs consisting of exactly one route, which exposes a static set of simple resources (Todo Items) as JSON. My results can be found in the results folder.
- h2load to be installed
- Clone this repository
- Start an HTTP server on your local machine
- Adapt parameters in
run-load.sh
URL
: The URL of your HTTP server's endpoint to be tested againstNUM_REQUESTS
: Total number of request to execute across all clientsCONCURRENCY
: Number of concurrent clients to perform requestsTHREADS
: Number of CPU threads to use for h2load
chmod +x run-load.sh
./run-load.sh
- View
results.log
Running this benchmark suite gave me the following results. To read more details about my test setup etc., please refer to this article.
MIT @ Ferdinand Mütsch