HTTP/2 - The Future of the Internet
HTTP/2 is the second primary version of the HTTP network protocol and the first new draft since HTTP/1.1. It was designed and officially presented by The Working Group in December 2014. Since then HTTP/2 has been widely supported by various web browsers. As of September 10th, 2016 World Wide Web Technology Surveys announced that HTTP/2 is utilized by 9.8% of the top 10 million websites. Due to its rapid growth rate and popularity, various companies such as Google, Twitter, Microsoft, Mozilla Corporation and Akamai are currently contributing to the development and stabilization of HTTP/2 technology.
While HTTP/2 leaves most of HTTP 1.1's high-level syntax unchanged, it proposes a new way for data framing and transportation between the client and the server. In contrast to older versions, HTTP/2 allows the server to respond to more queries than the client actually requested. Hence, the web server can now supply data for the client(web browser) without waiting for the browser to inspect the first response. This allows the server to avoid the round trip of delay by directing the responses that it thinks the web server will need in the future, allowing major performance improvements. HTTP/2 also provides some interesting new features, in particular, connection multiplexing over a single TCP connection and fixing head-of-line blocking, which solves the current problems of HTTP/1.1 pipelining.
The multiplexing feature in HTTP/2 allows to asynchronously send many HTTP requests and receive responses using a single TCP connection. The previous version of it—HTTP pipelining (used in HTTP/1.1)—sends multiple HTTP requests on a single TCP connection without waiting for corresponding responses. Over time, pipelining turned out to have many disadvantages—it is hard to deploy, it still provides certain limitations, and a lot of servers don’t process it correctly. Persistent HTTP connection without pipelining, which was available at one point, had an even more dramatic drawback—the client side couldn’t send a new request unless the previous response had been received, resulting in a relatively long lasting completion time.
In order to demonstrate the real power of multiplexing, we decided to run a sample experiment, which would compare the times for downloading files using multiplexed, pipelined and persistent non-pipelined(regular) connections. We created a public server that included 1000 files each containing 4kb of junk memory. After creating a stable testing environment, we tried to download those files using the above mentioned connections. For this trial demo, we heavily utilized the libcurl client-side URL transfer library, which supports both the HTTP/2 protocol and the previous versions of it. Here you can find the numerical representation of the results:
As you can notice, when downloading big amount of files, the multiplexing feature of HTTP/2 provides very huge benefits in terms of speed. Another indisputable merit of HTTP/2 technology is the guarantee of security due to mandatory traffic encryption and usage of Web Application Firewalls. Despite the high-speed acceptance and demand, HTTP/2 is not finalized yet and its support in various systems is still in its early stages. There is no exact estimated date of when HTTP/1.1 will be fully replaced by the newest protocol, however HTTP/2’s strong influence on modern Internet technologies will be revolutionary.
Teaching Assistant at San Francisco State University
8 年Great article Rafayel.
Freelance Developer at oDesk
8 年Very interesting article. Great work! Thanks for posting it.
Chief Product Officer at Fastex | 10+ Years Experience In Product Management | Product Mentor
8 年Thanks for explaning the general concept of HTTP/2. What are the most popular servers that currently support HTTP/2?
.
8 年Very interesting article Rafayel. I really enjoyed reading about the new features of HTTP/2. Thanks for posting.
Senior Software Engineer at Oracle
8 年Thanks for posting :)