官术网_书友最值得收藏!

Enabling HTTP/2 on NGINX

The now ratified HTTP/2 standard is based on SPDY, an experimental protocol that Google developed internally. As shown in the diagram in the previous recipe, establishing an HTTPS connection can be quite time consuming. With HTTP/1.1, each connection to the web server must follow this process and wait for the handshake to complete.

In HTTP/2, this handshake time is reduced, but more importantly the requests are multiplexed over a single TCP connection. This means that the handshake only has to occur once, significantly reducing the latency of a site for the end user. In fact, it means that an HTTP/2-based site can actually be quicker than a standard HTTP-based one.

There are a number of other benefits that HTTP/2 also provides, such as header compression, a new binary protocol, and a server-based push. All of these further increase the efficiency of HTTP/2, yet it also remains backwards compatible with HTTP/1.1:

HTTP/2 support
Source: caniuse.com (April 2017)

All modern browsers (as shown in the preceding figure) support HTTP/2 natively, so it's ready to deploy in production. NGINX officially supported HTTP/2 starting with version 1.9.5.

主站蜘蛛池模板: 大悟县| 灵璧县| 新竹县| 邵武市| 偏关县| 潞城市| 花莲县| 石狮市| 松江区| 织金县| 若尔盖县| 鹿邑县| 辽中县| 西林县| 阳城县| 惠东县| 肥东县| 新安县| 互助| 铅山县| 安西县| 旌德县| 景德镇市| 韶关市| 崇礼县| 云霄县| 襄樊市| 平度市| 彭泽县| 太仓市| 鄢陵县| 随州市| 饶平县| 贵阳市| 常宁市| 罗山县| 海盐县| 新源县| 清苑县| 庆安县| 泽普县|