HTTP/2 to Origin
A protocol is a set of rules governing the exchange or transmission of data between devices. One of the most important protocols that run on the human-computer interaction layer, where applications can access the network services, is HTTP (Hypertext Transfer Protocol).
HTTP is a well established protocol that has several versions, and each version adds features that improve performance over the older one. HTTP/1.1 and HTTP/2 are widely deployed on the Internet today. HTTP/1.1 has been around for more than a decade, but in 2015 the IETF (Internet Engineering Task Force) introduced HTTP/2, which introduces several features to reduce page load times. To know more about the differences between HTTP/1.1 and HTTP/2, please refer to HTTP/2 versus HTTP/1.1 ↗.
Free | Pro | Business | Enterprise | |
---|---|---|---|---|
Availability | Yes | Yes | Yes | Yes |
At Cloudflare, HTTP/2 connection to the origin is enabled by default.
If you wish to disable HTTP/2 to Origin, you can follow these steps:
- Log into the Cloudflare dashboard ↗ and select your account.
- Choose the domain that will use HTTP/2 to Origin.
- Select Speed > Optimization.
- Navigate to the Protocol Optimization tab and under HTTP/2 to Origin set the toggle to Off.
Cloudflare’s HTTP/2 multiplexing to origin reduces active connections by pooling many requests into fewer TCP connections. If a request arrives and the current connection has not reached the stream limit, Cloudflare reuses the existing connection. If the limit has not been reached, Cloudflare may open additional connections to handle more requests. Because multiplexing reuses fewer TCP connections, the overall number of active connections to your origin will typically be lower, which is often helpful for systems sensitive to connection overhead. During surges (like failovers), Cloudflare scales connections by first using available streams, then opening new ones as needed.
Connection multiplexing is enabled by default on Free, Pro and Business zones and uses up to 100 concurrent streams by default. For Enterprise plans, you can explicitly configure the maximum number of concurrent streams (often called the “multiplexing ratio”) for a zone.
Note that if the origin does not support HTTP/2, Cloudflare will initiate an HTTP/1.1 connection. We connect to servers who announce support of HTTP/2 connections via ALPN ↗.
If you are unsure if your server supports HTTP/2, we suggest checking your origin server’s documentation or using a testing tool for HTTP/2 implementation (for example, h2spec ↗).