On HTTP/2 today

Its 2018 and its a long overdue performance upgrade from the 1999 HTTP 1.0 and 1.1 Specs.  Its promise is to reduce the perceived load time in user perspective and also have more efficient use of server and network usage.

So lets try out and see if we could have more optimized results on one of my development environment.

The test would be using a single website, cache disabled using Chrome so that we could have a measuring tool for performance. We would perform two tests, before and after we turn-on the HTTP/2 version on our web servers.

My development site using HTTP 1.1

image

Same development site upgraded to HTTP/2:

image

Response time results: HTTP/2 Performs better in returning individual resources from the server.

Type HTTP 1.1 HTTP/2
Initial Document HTML 346 MS 57 MS
SVG Image XML 165 MS 47 MS
Site.min.js JS 65 MS 43 MS
Site.min.css CSS 57 MS 48 MS
Select2.min.js JS 85 MS 84 MS
Select2.min.css CSS 121 MS 49 MS

Size results: HTTP/2 Do compress the content, this shows that files served thru HTTP/2 is lower in size.

Type HTTP 1.1 HTTP/2
Initial Document HTML 2.6 KB 2.4 KB
SVG Image XML 1.4 KB 1.2 KB
Site.min.js JS 603 B 203 B
Site.min.css CSS 1.4 KB 1.1 KB
Select2.min.js JS 25.1 KB 24.8 KB
Select2.min.css CSS 3.1 KB 2.8 KB

Domain sharding Results: Need more verifications (Am sleepy na)

According to the previous spec (8.1.4 Practical Considerations) a client should not maintain 2 connections with any server or proxy. Thus we had to do a workaround where resources are located on a different server (Or in our case, different DNS name or using a Content Delivery Network). Now from our results:

image

I am thinking about not using CDN anymore if they are still using SPDY or 1.1, however looking at the results, cached:

image


Enabling HTTP/2

How did I enable HTTP/2. This site is hosted in Azure as an app service. To enable, search for the HTTP version on the Application Settings. Click save and refresh.

image

For the on-premise-premise, HTTP/2 is also available on Windows Server 2016/IIS 10 and Windows 10.

Advertisements

Published by

johndelizo

John is currently creating digital assets that protects people and their future, a technical trainer and a full time geek specializing on development and deployment of innovations created with .NET framework on Windows platform as well as Windows infrastructure projects. He is the primary contact of the Philippine Windows Users Group, a contributor at the Microsoft Philippines Community forums and regularly conducts community sessions as well as other Microsoft technology events. John owns the Busy Saving The World Techblog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s