Running HTTP/2 tests on Flood

This guide details how to run JMeter HTTP/2 tests on Flood.

Enter HTTP/2 - the next generation protocol based on a Google project called SPDY to provide higher levels of performance to web applications.

As of March 2018, almost 25% of the top 10 million websites support it - so it is becoming increasingly common. Along with adoption comes the need to be able to validate an application's performance and reliability built upon the technology.

HTTP/2 contains a number of improvements over HTTP 1.x - namely:

  • Data compression of HTTP headers

  • HTTP/2 Server Push capability

  • Request Pipelining

  • Fixing some known issues with HTTP 1.x

  • Multiplexing multiple requests over a single TCP connection

Setting up the HTTP/2 Sampler in JMeter

In this guide - we'll be using JMeter to generate HTTP/2 requests against an HTTP/2 enabled target application. We'll also be using the HTTP/2 Sampler which doesn't come included with the default JMeter installation and we'll have to add it in.

Simply search for the HTTP/2 plugin, select 'HTTP/2 Sampler' from the list and click on the Apply Changes and Restart JMeter. We'll cover how to do this through Flood further into this guide.

You will now have the HTTP/2 Sampler available to be included in your script. ​

Setting up a simple HTTP/2 JMeter test plan

In order to properly test HTTP/2 endpoints - the JMeter test plan must contain updated plugins specifically for the HTTP/2 protocol. These add-ins include modified versions of the default HTTP 1.x plugins - which are:

1. HTTP2 Request Defaults 2. HTTP2 Request 3. Simple Data Writer HTTP2 4. View Results Tree HTTP2

These need to be used in place of their default HTTP counterparts when testing HTTP/2 target sites.

Running HTTP/2 through Flood

Running HTTP/2 tests through Flood will require the upload of these same libraries that were installed on your JMeter local instance via the plugins manager. Since the HTTP/2 plugins use an implementation of Jetty - there are a number of Jetty libraries that JMeter needs to run successfully and they need to be uploaded to Flood alongside the actual script.

A copy of the zip file is available for download: here <link to zip file>

In our example HTTP/2 script we have both HTTP1 & HTTP 2 requests for the same pages & resources. This is intended to see the performance difference between the two versions of protocols in terms of response times.

Last updated