HTTP/2
   HOME

TheInfoList



OR:

HTTP/2 (originally named HTTP/2.0) is a major revision of the
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
network protocol used by the
World Wide Web The World Wide Web (WWW), commonly known as the Web, is an information system enabling documents and other web resources to be accessed over the Internet. Documents and downloadable media are made available to the network through web ...
. It was derived from the earlier experimental
SPDY SPDY (pronounced "speedy") is an obsolete open-specification communication protocol developed for transporting web content. SPDY became the basis for HTTP/2 specification. However, HTTP/2 diverged from SPDY and eventually HTTP/2 subsumed all u ...
protocol, originally developed by
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
. HTTP/2 was developed by the HTTP Working Group (also called httpbis, where "" means "twice") of the
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
(IETF). HTTP/2 is the first new version of HTTP since HTTP/1.1, which was standardized in in 1997. The Working Group presented HTTP/2 to the
Internet Engineering Steering Group The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
(IESG) for consideration as a Proposed Standard in December 2014, and IESG approved it to publish as Proposed Standard on February 17, 2015 (and was updated in February 2020 in regard to TLS 1.3). The HTTP/2 specification was published as on May 14, 2015. The standardization effort was supported by Chrome,
Opera Opera is a form of theatre in which music is a fundamental component and dramatic roles are taken by singers. Such a "work" (the literal translation of the Italian word "opera") is typically a collaboration between a composer and a libr ...
,
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current ...
,
Internet Explorer 11 Internet Explorer 11 (IE11) is the eleventh, final, and now deprecated version of the Internet Explorer web browser. It was initially included in the release of Windows 8.1, Windows RT 8.1 and Windows Server 2012 R2 on October 17, 2013, and was ...
, Safari, Amazon Silk, and
Edge Edge or EDGE may refer to: Technology Computing * Edge computing, a network load-balancing system * Edge device, an entry point to a computer network * Adobe Edge, a graphical development application * Microsoft Edge, a web browser developed ...
browsers. Most major browsers had added HTTP/2 support by the end of 2015. About 97% of web browsers used have the capability. , 41% (after topping out at just over 50%) of the top 10 million websites supported HTTP/2. Its successor is HTTP/3, a major revision that builds on the concepts established by HTTP/2.


Goals

The working group charter mentions several goals and issues of concern: * Create a negotiation mechanism that allows clients and servers to elect to use HTTP/1.1, 2.0, or potentially other non-HTTP protocols. * Maintain high-level compatibility with HTTP/1.1 (for example with methods, status codes, URIs, and most header fields). * Decrease latency to improve page load speed in
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
s by considering: **
data compression In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compressio ...
of
HTTP header The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, w ...
s ** HTTP/2 Server Push ** prioritization of requests ** multiplexing multiple requests over a single TCP connection (fixing the
head-of-line blocking Head-of-line blocking (HOL blocking) in computer networking is a performance-limiting phenomenon that occurs when a line of packets is held up in a queue by a first packet. Examples include input buffered network switches, out-of-order delivery a ...
problem in HTTP 1.x) * Support common existing use cases of HTTP, such as desktop web browsers, mobile web browsers, web APIs, web servers at various scales,
proxy server In computer networking, a proxy server is a server application that acts as an intermediary between a client requesting a resource and the server providing that resource. Instead of connecting directly to a server that can fulfill a reques ...
s,
reverse proxy In computer networks, a reverse proxy is the application that sits in front of back-end applications and forwards client (e.g. browser) requests to those applications. Reverse proxies help increase scalability, performance, resilience and securi ...
servers, firewalls, and
content delivery network A content delivery network, or content distribution network (CDN), is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially rel ...
s.


Differences from HTTP/1.1

The proposed changes do not require any changes to how existing web applications work, but new applications can take advantage of new features for increased speed. HTTP/2 leaves all of HTTP/1.1's high-level semantics, such as methods, status codes, header fields, and URIs, the same. What is new is how the data is framed and transported between the client and the server. Websites that are efficient minimize the number of requests required to render an entire page by minifying (reducing the amount of code and packing smaller pieces of code into bundles, without reducing its ability to function) resources such as images and scripts. However, minification is not necessarily convenient nor efficient and may still require separate HTTP connections to get the page and the minified resources. HTTP/2 allows the server to "push" content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle. Additional performance improvements in the first draft of HTTP/2 (which was a copy of SPDY) come from multiplexing of requests and responses to avoid some of the
head-of-line blocking Head-of-line blocking (HOL blocking) in computer networking is a performance-limiting phenomenon that occurs when a line of packets is held up in a queue by a first packet. Examples include input buffered network switches, out-of-order delivery a ...
problem in HTTP 1 (even when
HTTP pipelining HTTP pipelining is a feature of HTTP/1.1 which allows multiple HTTP requests to be sent over a single TCP connection without waiting for the corresponding responses. HTTP/1.1 requires servers to respond to pipelined requests correctly, with non-p ...
is used), header
compression Compression may refer to: Physical science *Compression (physics), size reduction due to forces *Compression member, a structural element such as a column *Compressibility, susceptibility to compression * Gas compression *Compression ratio, of a ...
, and prioritization of requests. However, as HTTP/2 runs on top of a single TCP connection there is still potential for head-of-line blocking to occur if TCP packets are lost or delayed in transmission. HTTP/2 no longer supports HTTP/1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.


History


Genesis in and later differences from SPDY

SPDY SPDY (pronounced "speedy") is an obsolete open-specification communication protocol developed for transporting web content. SPDY became the basis for HTTP/2 specification. However, HTTP/2 diverged from SPDY and eventually HTTP/2 subsumed all u ...
(pronounced like "speedy") was a previous HTTP-replacement protocol developed by a research project spearheaded by
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
. Primarily focused on reducing latency, SPDY uses the same TCP pipe but different protocols to accomplish this reduction. The basic changes made to HTTP/1.1 to create SPDY included: "true request pipelining without FIFO restrictions, message framing mechanism to simplify client and server development, mandatory compression (including headers), priority scheduling, and even bi-directional communication". The HTTP Working Group considered Google's SPDY protocol,
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
's HTTP Speed+Mobility proposal (SPDY based), and Network-Friendly HTTP Upgrade. In July 2012,
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Mosk ...
provided feedback on each of the proposals and recommended HTTP/2 be based on SPDY. The initial draft of HTTP/2 was published in November 2012 and was based on a straight copy of SPDY. The biggest difference between HTTP/1.1 and SPDY was that each user action in SPDY is given a "stream ID", meaning there is a single TCP channel connecting the user to the server. SPDY split requests into either control or data, using a "simple to parse binary protocol with two types of frames". SPDY showed evident improvement over HTTP, with a new page load speedup ranging from 11% to 47%. The development of HTTP/2 used SPDY as a jumping-off point. Among the many detailed differences between the protocols, the most notable is that HTTP/2 uses a fixed
Huffman code In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code proceeds by means of Huffman coding, an algori ...
-based header compression algorithm, instead of SPDY's dynamic stream-based compression. This helps to reduce the potential for compression oracle attacks on the protocol, such as the
CRIME In ordinary language, a crime is an unlawful act punishable by a state or other authority. The term ''crime'' does not, in modern criminal law, have any simple and universally accepted definition,Farmer, Lindsay: "Crime, definitions of", in Ca ...
attack. On February 9, 2015, Google announced plans to remove support for SPDY in Chrome in favor of support for HTTP/2. That took effect, starting with Chrome 51.


Development milestones


Encryption

HTTP/2 is defined both for HTTP URIs (i.e. without TLS
encryption In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can de ...
, a configuration which is abbreviated in ) and for HTTPS URIs (over TLS using ALPN extension where TLS 1.2 or newer is required, a configuration which is abbreviated in ). Although the standard itself does not require usage of encryption, all major client implementations (Firefox, Chrome, Safari, Opera, IE, Edge) have stated that they will only support HTTP/2 over TLS, which makes encryption
de facto ''De facto'' ( ; , "in fact") describes practices that exist in reality, whether or not they are officially recognized by laws or other formal norms. It is commonly used to refer to what happens in practice, in contrast with ''de jure'' ("by la ...
mandatory.


Criticisms


Development process

The FreeBSD and Varnish developer
Poul-Henning Kamp Poul-Henning Kamp (; born 1966) is a Danish computer software developer known for work on various projects including FreeBSD and Varnish. He currently resides in Slagelse, Denmark. Involvement in the FreeBSD project Poul-Henning Kamp has been c ...
asserts that the standard was prepared on an unrealistically short schedule, ruling out any basis for the new HTTP/2 other than the SPDY protocol and resulting in other missed opportunities for improvement. Kamp criticizes the protocol itself for being inconsistent and having needless, overwhelming complexity. He also states that the protocol violates the protocol layering principle, for example by duplicating flow control that belongs in the transport layer (TCP). He also suggested that the new protocol should have removed
HTTP Cookies HTTP cookies (also called web cookies, Internet cookies, browser cookies, or simply cookies) are small blocks of data created by a web server while a user is browsing a website and placed on the user's computer or other device by the user's we ...
, introducing a breaking change.


Encryption

Initially, some members of the Working Group tried to introduce an encryption requirement in the protocol. This faced criticism. Critics stated that encryption has non-negligible computing costs and that many HTTP applications actually have no need for encryption and their providers have no desire to spend additional resources on it. Encryption proponents have stated that this encryption overhead is negligible in practice.
Poul-Henning Kamp Poul-Henning Kamp (; born 1966) is a Danish computer software developer known for work on various projects including FreeBSD and Varnish. He currently resides in Slagelse, Denmark. Involvement in the FreeBSD project Poul-Henning Kamp has been c ...
has criticized the IETF for hastily standardizing Google's SPDY prototype as HTTP/2 due to political considerations. The criticism of the agenda of mandatory encryption within the existing certificate framework is not new, nor is it unique to members of the open-source community a
Cisco Cisco Systems, Inc., commonly known as Cisco, is an American-based multinational digital communications technology conglomerate corporation headquartered in San Jose, California. Cisco develops, manufactures, and sells networking hardware, ...
employee stated in 2013 that the present certificate model is not compatible with small devices like routers, because the present model requires not only annual enrollment and remission of non-trivial fees for each certificate, but must be continually repeated on an annual basis. In the end the Working Group did not reach consensus over the mandatory encryption, although most client implementations require it, which makes encryption a ''de facto'' requirement. The HTTP/2 protocol also faced criticism for not supporting
opportunistic encryption Opportunistic encryption (OE) refers to any system that, when connecting to another system, attempts to encrypt communications channels, otherwise falling back to unencrypted communications. This method requires no pre-arrangement between the two ...
, a measure against passive monitoring similar to the STARTTLS mechanism that has long been available in other Internet protocols like
SMTP The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients ty ...
. Critics have stated that the HTTP/2 proposal goes in violation of IETF's own "Pervasive Monitoring Is an Attack", which also has a status of
Best Current Practice A Best Current Practice (BCP) is a ''de facto'' level of performance in engineering and information technology. It is more flexible than a standard, since techniques and tools are continually evolving. The Internet Engineering Task Force publish ...
188. RFC7258/BCP188 mandates that passive monitoring be considered as an attack, and protocols designed by IETF should take steps to protect against passive monitoring (for example, through the use of opportunistic encryption). A number of specifications for opportunistic encryption of HTTP/2 have been provided, of which draft-nottingham-http2-encryption was adopted as an official work item of the working group, leading to the publication of in May 2017.


TCP head-of-line blocking

Although the design of HTTP/2 effectively addresses the HTTP-transaction-level
head-of-line blocking Head-of-line blocking (HOL blocking) in computer networking is a performance-limiting phenomenon that occurs when a line of packets is held up in a queue by a first packet. Examples include input buffered network switches, out-of-order delivery a ...
problem by allowing multiple concurrent HTTP transactions, all those transactions are multiplexed over a single TCP connection, meaning that any packet-level head-of-line blocking of the TCP stream simultaneously blocks all transactions being accessed via that connection. This head-of-line blocking in HTTP/2 is now widely regarded as a design flaw, and much of the effort behind QUIC and HTTP/3 has been devoted to reduce head-of-line blocking issues.


Server-side support


Server software

* Apache 2.4.12 supports HTTP/2 via the module mod_h2, although appropriate patches must be applied to the source code of the server in order for it to support that module. As of Apache 2.4.17 all patches are included in the main Apache source tree, although the module itself was renamed mod_http2. Old versions of SPDY were supported via the module mod_spdy, however the development of the mod_spdy module has stopped. *
Apache Tomcat Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also ...
supports HTTP/2 with version 8.5 and newer with a configuration change. *
Apache Traffic Server The Apache Traffic Server (ATS) is a modular, high-performance reverse proxy and forward proxy server, generally comparable to Nginx and Squid. It was created by Inktomi, and distributed as a commercial product called the Inktomi Traffic Server ...
supports HTTP/2. * Caddy supports HTTP/2. * Charles Proxy supports HTTP/2 since version Charles 4. * Citrix NetScaler 11.x supports HTTP/2. * Sucuri Supports HTTP/2. * F5 BIG-IP Local Traffic Manager 11.6 supports HTTP/2. *
Barracuda Networks Barracuda Networks, Inc. is a company providing security, networking and storage products based on network appliances and cloud services. The company's security products include products for protection against email, web surfing, web hackers an ...
WAF (Web Application Firewall) supports HTTP/2. * h2o was built from the ground up for HTTP/2 support. * HAProxy 1.8 supports HTTP/2. *
Jetty A jetty is a structure that projects from land out into water. A jetty may serve as a breakwater, as a walkway, or both; or, in pairs, as a means of constricting a channel. The term derives from the French word ', "thrown", signifying some ...
9.3 supports HTTP/2. *
lighttpd lighttpd (pronounced "lighty") is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem ...
1.4.56 supports HTTP/2. * LiteSpeed Web Server 5.0 supports HTTP/2. * Microsoft IIS supports HTTP/2 in Windows 10,
Windows Server 2016 Windows Server 2016 is the eighth release of the Windows Server Server (computing), server operating system developed by Microsoft as part of the Windows NT family of operating systems. It was developed concurrently with Windows 10 and is the su ...
, and Windows Server 2019. * Netty 4.1 supports HTTP/2. *
nginx Nginx (pronounced "engine x" ) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software ...
1.9.5 supports HTTP/2, released on September 22, 2015, using module ngx_http_v2_module and HTTP/2 Server Push since version 1.13.9 on February 20, 2018. * Node.js Stable support since 8.13.0. (5.0 supports HTTP/2 with a module and Node 8.4 introduced experimental built-in support for HTTP/2.)
Kestrel web server
for ASP.NET Core supports HTTP/2 since .NET Core 2.2.0-preview 1. * OpenLiteSpeed 1.3.11 and 1.4.8 supports HTTP/2.
Proxygen
supports HTTP/2. * Pulse Secure Virtual Traffic Manager 10.2 supports HTTP/2. *
Radware Radware Inc. is an American provider of cybersecurity and application delivery products for physical, cloud and software-defined data centers. Radware's corporate headquarters are located in Mahwah, New Jersey. The company also has offices in Eur ...
Alteon NG supports HTTP/2. * ShimmerCat supports HTTP/2. * Vert.x 3.3 supports HTTP/2. * Warp (
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lan ...
web server, used by default in
Yesod Yesod (Hebrew: יְסוֹד ''Yəsōḏ'', Tiberian: ''Yăsōḏ'', "foundation") is a sephirah or node in the kabbalistic Tree of Life, a system of Jewish philosophy. Yesod, located near the base of the Tree, is the sephirah below Hod and ...
) supports HTTP/2. * Wildfly 9 supports HTTP/2.
Envoy proxy
supports HTTP/2.


Content delivery networks

* Akamai was the first major CDN to support HTTP/2 and HTTP/2 Server Push. * Microsoft Azure supports HTTP/2. * PageCDN supports HTTP/2 out of the box and provides user-interface to setup HTTP/2 Server Push in CDN dashboard. * CDN77 supports HTTP/2 using nginx (August 20, 2015). *
Cloudflare Cloudflare, Inc. is an American content delivery network and DDoS mitigation company, founded in 2009. It primarily acts as a reverse proxy between a website's visitor and the Cloudflare customer's hosting provider. Its headquarters are in Sa ...
supports HTTP/2 using nginx with SPDY as a fallback for browsers without support, whilst maintaining all security and performance services. Cloudflare was the first major CDN to support HTTP/2 Server Push. * AWS CloudFront supports HTTP/2 since September 7, 2016.
Fastly
supports HTTP/2 including Server Push. * Imperva Incapsula CDN supports HTTP/2. The implementation includes support for WAF and DDoS mitigation features as well. * KeyCDN supports HTTP/2 using nginx (October 6, 2015)
HTTP/2 Test
is a test page to verify if your server supports HTTP/2. * Voxility supports HTTP/2 using nginx since July, 2016. The implementation comes in support for Cloud DDoS mitigation services. * StackPath supports HTTP/2.


Implementations

* Other implementations are collected on th
GitHub HTTP/2 wiki


See also

*
gRPC gRPC (Google Remote Procedure Calls) is a cross-platform open source high performance Remote procedure call, Remote Procedure Call (RPC) framework. gRPC was initially created by Google, which has used a single general-purpose RPC infrastructure ...
*
HTTP pipelining HTTP pipelining is a feature of HTTP/1.1 which allows multiple HTTP requests to be sent over a single TCP connection without waiting for the corresponding responses. HTTP/1.1 requires servers to respond to pipelined requests correctly, with non-p ...
* HTTP request and response messages * HTTP/3 * QUIC *
SPDY SPDY (pronounced "speedy") is an obsolete open-specification communication protocol developed for transporting web content. SPDY became the basis for HTTP/2 specification. However, HTTP/2 diverged from SPDY and eventually HTTP/2 subsumed all u ...
*
WebSocket WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as in 2011. The current API specification allowing web applications ...
* Web Server *
Web Browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
*


References


External links

* * * – Hypertext Transfer Protocol version 2 (HTTP/2) * – HPACK: Header Compression for HTTP/2
HTTP/2 explained
(
Daniel Stenberg Magnus Daniel Stenberg is a Swedish developer, recipient of the Polhem Prize 2017 for his work on cURL. He was born and raised in Huddinge, a suburb south of Sweden's capital Stockholm. He created a utility which, after various name and licens ...
) * /tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00 SPDY Protocol(draft-mbelshe-httpbis-spdy-00) * /tools.ietf.org/html/draft-montenegro-httpbis-speed-mobility-01 HTTP Speed+Mobility(draft-Montenegro-httpbis-speed-mobility-01) * /tools.ietf.org/html/draft-tarreau-httpbis-network-friendly-00 Proposal for a Network-Friendly HTTP Upgrade(draft-tarreau-httpbis-network-friendly-00) {{DEFAULTSORT:HTTP 2 Hypertext Transfer Protocol Application layer protocols 2015 introductions