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

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.

主站蜘蛛池模板: 河南省| 会同县| 祁阳县| 宾阳县| 德惠市| 垣曲县| 岑溪市| 濮阳市| 洮南市| 盐池县| 上高县| 饶阳县| 色达县| 昭苏县| 砀山县| 南宫市| 乳山市| 镇雄县| 板桥市| 庆安县| 利津县| 广汉市| 白朗县| 顺平县| 平湖市| 泌阳县| 县级市| 汨罗市| 连平县| 西畴县| 葵青区| 璧山县| 孟津县| 盐山县| 奇台县| 防城港市| 化州市| 兴和县| 清徐县| 通城县| 如东县|