Improving Web Page Load Speed in eG Enterprise by Using HTTP/2

What is HTTP/2?

HTTP/2 LogoHTTP/2 (originally named HTTP/2.0) was a major revision of the HTTP network protocol used by the World Wide Web published in 2015. Indeed, those in the Citrix/EUC ecosystem may remember Marius Sandbu investigating the benefits of HTTP/2 for NetScaler, Microsoft IIS, and Storefront users back in 2015/6.

HTTP/2 was the first new version of HTTP since HTTP/1.1, which itself was standardized in RFC 2068 in 1997. It was named 2.0 (and then 2) rather than 1.2 because it is not backwardly compatible with the 1.1 standard.

There were numerous improvements added to HTTP/2 over HTTP/1.1; there is an excellent overview available here: HTTP/2: the difference between HTTP/1.1, benefits and how to use it | by Factory.hr | Medium.

Multiplexing of requests and responses in HTTP/2

Figure 1: Multiplexing of requests/responses in HTTP/2

HTTP/2 improved on HTTP/1.1 in several ways and a significant overall benefit is the improved page load speed. The key changes in HTTP/2 are:

  • Binary protocol – Binary protocols consume less bandwidth, are more efficiently parsed, and are less error-prone than the textual protocols used by HTTP/1.1. Additionally, they can handle elements such as whitespace, capitalization, and line endings better.
  • Multiplexing – HTTP/2 is multiplexed, i.e., it can initiate multiple requests in parallel over a single TCP connection. As a result, web pages containing several elements are delivered over one TCP connection. These capabilities solve the head-of-line blocking problem in HTTP/1.1, in which a packet at the front of the line blocks others from being transmitted.
  • Header compression – HTTP/2 uses header compression to reduce the overhead caused by TCP’s slow-start mechanism.
  • Server push – HTTP/2 servers push likely-to-be-used resources into a browser’s cache, even before they’re requested. This allows browsers to display content without additional request cycles.
  • Increased security – Web browsers only support HTTP/2 via encrypted connections, thus increasing user and application security.

Using HTTP/2 in eG Enterprise to Improve Page Load Speed

Using standard protocols, such as HTTP is a key tenet of eG agent-to-manager communication architecture. How this benefits the security of our architecture is covered in a recent blog post by Barry Schiffer, available here.

The use of HTTP/2 is supported within eG Enterprise and has proven to be of benefit in our internal testing processes. In this blog post, I’ll cover:

  • How to configure eG Enterprise to use HTTP/2
  • How we compared the performance of HTTP/2 vs. HTTP/1.1
  • The performance enhancements we found in first time loading speeds of web pages (up to 30% speed up on an average)
  • Useful links to everything you could ever want to know about HTTP/2

How to configure eG Enterprise to support HTTP/2

Locate the eG Manager configuration file: <EG_INSTALL_DIR>\manager\tomcat\conf\server.

  • Take a backup of server.xml.
  • Open server.xml and look for SSL, which you will find in the Coyote section.
  • Add the following in the SSL Connector setting:
    <UpgradeProtocol className=”org.apache.coyote.http2.Http2Protocol” />
  • Save the server.xml file.
  • Stop and restart the manager, as appropriate for your platform.

Server .xml with upgraded protocol configuration

Figure 2: Server.xml with the upgrade protocol configuration

Further information on configuring server.xml can be found within “The eG Knowledge Base” documentation.

Comparing the performance of HTTP/2 vs. HTTP/1.1 for eG Enterprise Web Access

We used eG Enterprise real user monitoring to measure the time taken to access the eG Enterprise login web page, the admin home page, and the monitoring screen showing the layered stack model of a component. We compared the page load times when using HTTP/2 and HTTP /1.1. For both protocols, we also collected data for when we cleared the cache between the login attempts and also for when we did not clear the cache between our login attempts.

Average time to load (seconds) – with the browser cache cleared during test runs
Login web page Admin
home page
Layered stack model
web page
HTTP/1.1 2.62 3.29 6.22
HTTP/2 1.24 2.87 4.59
% improvement 53% 13% 26%

From the above table, you can see that:

  • First time loading of web pages was significantly improved – we recorded gains of up to 30% speed up on an average.
  • Subsequent loading of these pages did not show any significant difference because most of the static data was cached on the browser and hence, there wasn’t a significant gain from the multiplexing capabilities of HTTP/2.

Additional HTTP/2 resources

The Future – HTTP/3

HTTP/3 is the next proposed version of the HTTP protocol. Whilst HTTP/3 does not have wide adoption on the web yet, its use is growing. The main difference between HTTP/3 and previous versions of the protocol is that HTTP/3 runs over QUIC instead of TCP. QUIC is widely considered a faster and more secure transport layer protocol.

As of July 2021, it has been reported that whilst the HTTP/3 protocol is still officially an Internet Draft, it is already supported by 72% of current web browsers.

Disclaimer: The content of all third-party sites is not officially endorsed by eG Innovations and any information they contain should be used and verified with appropriate due diligence by the reader.

eG Enterprise is an Observability solution for Modern IT. Monitor digital workspaces,
web applications, SaaS services, cloud and containers from a single pane of glass.