Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

Benchmarking HTTP/2 servers with h2load - an Apache Bench & Siege equivalent

Web performance enthusiasts have been running load simulations with simple tools such as Apache Bench and Siege for years now. Hell, AB is based on Zeus from 1996. These tools allow you to simulate HTTP traffic using multiple parameters such as concurrency, length of time, number of requests made, etc.

For modern protocols you need modern tools. To get started with testing your HTTP/2 server I recommend installing h2load:

h2load is benchmarking tool for HTTP/2. If built with spdylay library, it also supports SPDY protocol. It supports SSL/TLS and clear text for both HTTP/2 and SPDY.

More information available online from the nghttp2 site: https://nghttp2.org/documentation/h2load-howto.html

Update: Ilari Stenroth pointed out that WRK is another good alternative, but did not look up on the HTTP/2 support roadmap. Read more: https://github.com/wg/wrk

There are also more complex tools available, but for many cases these simple load generating tools are good enough for rough performance testing.


Written by Jani Tarvainen on Tuesday June 23, 2015
Permalink - Tags: http2, h2o, hhvm, php, php-fpm, nginx, apache

« Serving PHP on HTTP/2 with H2O and HHVM (Symfony, WordPress, Drupal...) - Compare resource loading between HTTP/2 (H2O) and HTTP/1.1 (Nginx) »