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.
How to run
- h2load to be installed
- Clone this repository
- Start an HTTP server on your local machine
- Adapt parameters in
URL: The URL of your HTTP server's endpoint to be tested against
NUM_REQUESTS: Total number of request to execute across all clients
CONCURRENCY: Number of concurrent clients to perform requests
THREADS: Number of CPU threads to use for h2load
chmod +x run-load.sh
Java vs. Go vs. Node
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