In early 2015, HTTP/2 was introduced as the new standard by IESG. This standard makes your application faster, simpler, and more robust. In this article, we take you through the differences between HTTP/1 and HTTP/2, the benefits, using HTTP/1 and HTTP/2 with windows tools for developers and some key terms.
Table of Contents
Why should I use HTTP/2?
Converting from using HTTP/1 to HTTP/2 brings the following benefits:
- HTTP/2 reduces latency by enabling full request and response multiplexing.
- Efficient compression of HTTP header fields.
- Support for request prioritization.
- Multiple concurrent exchanges on the same connections.
- An unsolicited push of representations from servers to clients.
What is SPDY?
SPDY was an experimental protocol, developed at Google and announced in mid-2009. The primary goal with SPDY was to try to reduce the load latency of web pages by addressing some of the well-known performance limitations of HTTP/1.1. Since 2012 the new experimental protocol was supported by the Chrome, Firefox, and Opera web browsers. A rapidly growing number of sites, both large and small, were deploying SPDY within their infrastructure. In effect, SPDY was on track to become a de facto standard through growing industry adoption. After a lot of discussion within the working group, the SPDY specification was adopted as a starting point for the new HTTP/2 protocol. If you want to read more about this click here for the full story
What are the key differences between HTTP/1.x and HTTP/2?
The most significant changes between HTTP/1.x and HTTP/2 are :
- There is a new binary framing layer which dictates how the HTTP messages are encapsulated and transferred between the client and server.
- The HTTP semantics, such as verbs, methods, and headers, are unaffected, but the way they are encoded while in transit is different.
- Unlike the newline delimited plaintext HTTP/1.x protocol, all HTTP/2 communication is split into smaller messages and frames, each of which is encoded in binary format.
- All communication is performed over a single TCP connection.
For the official “RFC” document describing HTTP/2 you can go to the following link: https://datatracker.ietf.org/doc/html/rfc7540#section-4
What are the performance differences between HTTP/1.x and HTTP/2?
The really great thing about Delphi is that we can already use the latest technology so that server applications with the HTTP/2 protocol can be implemented by developers. One of the Embarcadero Technology Partners, namely ESEGECE, has created a HTTP server component which implements the HTTP/2 protocol.
Let’s compare the performance difference between the HTTP/1 and HTTP/2 using ESEGECE’s components. You can download a trial version here: https://www.esegece.com/websockets/download
In my tests, HTTP/2 has a speed of at least 50% more than HTTP/1.x.
RAD Studio Delphi gets your applications from idea to reality with maximum speed and efficiency. Why not try it for yourself today?
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
“This video is private”
Sorry about that. It looks like something changed on the video hosting site. I’ve had to remove the video – I’ve updated the post to reflect that. Thanks for pointing it out.
Hey Ian, is embarcadero plaining to support http/2 ? Do you know what is the time line of production for Indy idHttp support?
We’re currently reviewing how best to handle HTTP/2 and things like OpenSSL better than we do right now. There is no current timescale, sorry.
I answered this elsewhere. The best answer I can give right now is we’re exploring what steps to take next and do not have a current timescale. Sorry!