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

  • NGINX Cookbook
  • Tim Butler
  • 187字
  • 2021-07-03 00:04:33

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.

主站蜘蛛池模板: 泾阳县| 永和县| 城步| 分宜县| 长海县| 同江市| 勃利县| 福泉市| 岳阳市| 泽州县| 尼木县| 饶河县| 兰坪| 大邑县| 章丘市| 城固县| 蚌埠市| 望奎县| 屏山县| 五寨县| 岑溪市| 兴和县| 乐山市| 青河县| 苍梧县| 甘洛县| 青海省| 潞城市| 聊城市| 湟中县| 雷山县| 九龙城区| 霍林郭勒市| 封开县| 平远县| 正阳县| 亳州市| 无锡市| 宽甸| 萝北县| 岐山县|