Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Server Benchmarks

A benchmark suite which, transparently, stress-tests web servers and generates a report in markdown. It measures the requests per second, data transferred and time between requests and responses.

Benchmarks: Jul 18, 2020 at 10:46am (UTC)

Why YABS (Yet Another Benchmark Suite)

It's true, there already enough of benchmark suites to play around. However, most of them don't even contain real-life test applications to benchmark, therefore the results are not always accurate e.g. a route handler executes SQL queries or reads and sends JSON. This benchmark suite is a fresh start, it can contain any type of tests as the tests are running as self-executables and the measuring is done by a popular and trusted 3rd-party software which acts as a real HTTP Client (one more reason of transparency). Contributions and improvements are always welcomed here.

Use case

Measure the performance of application(s) between different versions or implementations (or web frameworks).

This suite can be further customized, through its tests.yml file, in order to test personal or internal web applications before their public releases.

Installation

The only requirement for the benchmark tool is the Go Programming Language.

$ go get -u github.com/kataras/server-benchmarks
$ go get -u github.com/codesenberg/bombardier

Depending on your test cases you may want to install Node.js and .NET Core too.

How to run

  1. Navigate to your tests directory, the one which includes a tests.yml file
  2. Open a temrinal and execute: server-benchmarks
  3. Wait for the executable server-benchmarks (or server-benchmarks.exe for windows) to finish
  4. That's all, now open the the results from the generated RESULTS.md file.

Advanced usage

  • Read the tests from the ./tests.dev.yml file
  • Wait 3 seconds between tests
  • Output the results to the ./dev directory
  • Write the results to a remote google spreadsheet table, which you can convert to a graph later on (as shown above).
$ server-benchmarks --wait-run=3s -i ./tests.dev.yml -o ./dev -g-spreadsheet $GoogleSpreadsheetID -g-secret client_secret.json

Run using Docker

The only requirement is Docker.

$ docker run -v ${PWD}:/data kataras/server-benchmarks

Benchmarks

The following generated README contains benchmark results from builtin tests between popular HTTP/2 web frameworks as of 2020.

Note: it's possible that the contents of this file will be updated regularly to accept even more tests cases and frameworks.

System

Processor Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
RAM 15.85 GB
OS Microsoft Windows 10 Pro for Workstations
Bombardier v1.2.4
Go go1.14.6
.Net Core 3.1.102
Node.js v14.4.0

Last updated: Jul 18, 2020 at 10:46am (UTC)

Terminology

Name is the name of the framework(or router) used under a particular test.

Reqs/sec is the avg number of total requests could be processed per second (the higher the better).

Latency is the amount of time it takes from when a request is made by the client to the time it takes for the response to get back to that client (the smaller the better).

Throughput is the rate of production or the rate at which data are transferred (the higher the better, it depends from response length (body + headers).

Time To Complete is the total time (in seconds) the test completed (the smaller the better).

Results

Test:Static

πŸ“– Fires 1000000 requests, receives a static message as response.

Name Language Reqs/sec Latency Throughput Time To Complete
Iris Go 206880 602.75us 36.09MB 4.84s
Gin Go 194837 639.72us 34.00MB 5.13s
Kestrel C# 193333 644.46us 32.81MB 5.17s
Chi Go 187499 664.76us 32.72MB 5.33s
Echo Go 185269 673.04us 32.33MB 5.40s
Martini Go 151410 823.06us 26.43MB 6.60s
Koa Javascript 106631 1.16ms 21.26MB 9.28s
Express Javascript 83514 1.49ms 21.59MB 11.93s
Buffalo Go 38466 3.25ms 6.71MB 26.00s

Test:Parameterized

πŸ“– Fires 550000 requests with a dynamic parameter of string, receives a hello text based on the parameter as response.

Name Language Reqs/sec Latency Throughput Time To Complete
Iris Go 193774 643.09us 37.14MB 2.84s
Chi Go 184545 676.70us 35.32MB 2.99s
Kestrel C# 182190 684.19us 33.87MB 3.02s
Echo Go 176197 708.66us 33.73MB 3.13s
Gin Go 174488 714.74us 33.45MB 3.15s
Martini Go 145396 0.86ms 27.88MB 3.78s
Koa Javascript 88820 1.37ms 19.46MB 6.06s
Express Javascript 73546 1.85ms 18.48MB 8.17s
Buffalo Go 37609 3.32ms 7.21MB 14.62s

Test:Sessions

πŸ“– Fires 250000 requests, sets a session and displays its value.

Name Language Reqs/sec Latency Throughput Time To Complete
Iris Go 106836 1.17ms 33.41MB 2.34s
Kestrel C# 78444 1.60ms 36.11MB 3.20s
Echo Go 73867 1.69ms 38.28MB 3.39s
Chi Go 68098 1.83ms 35.31MB 3.67s
Martini Go 67507 1.85ms 35.03MB 3.70s
Gin Go 57493 2.18ms 24.07MB 4.36s
Koa Javascript 47820 2.79ms 20.15MB 5.60s
Express Javascript 27617 4.38ms 7.64MB 8.77s
Buffalo Go 16810 7.45ms 24.08MB 14.90s

Test:REST

πŸ“– Fires 200000 requests with a dynamic parameter of int, sends JSON as request body and receives JSON as response.

Name Language Reqs/sec Latency Throughput Time To Complete
Iris Go 150430 826.05us 41.25MB 1.33s
Chi Go 146274 0.85ms 39.32MB 1.37s
Gin Go 141664 0.88ms 38.74MB 1.41s
Echo Go 138915 0.90ms 38.15MB 1.44s
Kestrel C# 136935 0.91ms 39.79MB 1.47s
Martini Go 128590 0.97ms 34.57MB 1.56s
Buffalo Go 58954 2.12ms 16.18MB 3.40s
Koa Javascript 50948 2.61ms 14.15MB 4.19s
Express Javascript 38451 3.24ms 13.77MB 5.21s

License

This project is licensed under the MIT License.

About

πŸš€ Cross-platform transparent benchmarks for HTTP/2 Web Servers at 2020

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published