As more and more sites switch to HTTPS, and more servers add HTTP/2 support, it can be difficult to determine which server has the best performance. This site aims to settle that question.
Benchmark result summary
Apache vs Caddy vs H2o vs LiteSpeed vs Nginx
Benchmark test results as of September 6, 2019, conducted on Digital Ocean 1GB droplets.
WordPress Home Page (HTTP/2)
All server setups use best available WordPress cache plugin.
Server Name | Requests/sec | Ratio |
---|---|---|
Apache 2.4.41 | 389.40 | 1.00X |
Caddy 0.11.4 | 441.00 | 1.13X |
H2o 2.2.6 | 721.90 | 1.85X |
LiteSpeed 5.4.1 | 29159.00 | 74.95X |
Nginx 1.16.1 | 3324.40 | 8.53X |
WordPress Home Page (HTTP/2 vs HTTP/1.1)
Compare HTTP/2 and HTTP/1.1 (with Keep-alive connections)
Server Name | HTTP/2 | HTTP/1.1 | HTTP/2 vs HTTP/1.1 |
---|---|---|---|
Apache 2.4.41 | 389.40 | 476.72 | 0.81X |
Caddy 0.11.4 | 441.00 | 433.36 | 1.02X |
H2o 2.2.6 | 721.90 | 621.08 | 1.16X |
LiteSpeed 5.4.1 | 29159.00 | 14290.00 | 2.04X |
Nginx 1.16.1 | 3324.40 | 3201.17 | 1.04X |
Benchmark Result: Apache vs Caddy vs H2o vs LiteSpeed vs Nginx in DigitalOcean 1GB droplet
Methodology
We provide an easy-to-use script so that you may set up and run the benchmarks yourself. If you don’t believe the published results, you can verify them on your own server.
How benchmarking is performed
- Micro benchmarks are included, to show the fundamental performance attributes of each server.
- Real-world web application benchmarks illustrate what is possible.
- Test clients send requests with an “
Accept-encoding: gzip
” header, to more closely simulate real browsers.
How can you contribute
The http2benchmark project is an open-source project hosted on GitHub.
Contributions are welcome, including:
- Suggestions for other server software that should be covered
- Submissions for a configuration tuning that you think would get better results
- Recommendations for additional test cases
- Your own test results to share
Give your feedback in the project’s Issues area or create a Pull Request, and add any of the following:
- Server setup scripts and configurations
- Server configuration tunings
- Your benchmark results
How to to run your own benchmark
You can easily run http2benchmark on your own server by following this guide.
It takes less than an hour of two $5 Digital Ocean droplets to verify the test results.
Total cost is less than $0.02. Give it a try. :-)
Server software compared
- Apache with W3TC cache for WordPress
- Caddy with W3TC cache for WordPress
- H2O with W3TC cache for WordPress
- LiteSpeed Enterprise with Litespeed Cache for WordPress
- Nginx with FastCGI cache for WordPress
Server software to be added soon
Test clients used
Micro benchmarks
- Small static HTML file that can be compressed
- Small static image files that cannot be compressed.
Application benchmark
- WordPress with cache plugin:
- LSCache for LiteSpeed
- W3 Total Cache for Apache, Caddy and H2o
- FastCGI Cache for Nginx