• http2 http1 对比


    RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2) https://tools.ietf.org/html/rfc7540#page-4

      The Hypertext Transfer Protocol (HTTP) is a wildly successful
       protocol.  However, the way HTTP/1.1 uses the underlying transport
       ([RFC7230], Section 6) has several characteristics that have a
       negative overall effect on application performance today.
    
       In particular, HTTP/1.0 allowed only one request to be outstanding at
       a time on a given TCP connection.  HTTP/1.1 added request pipelining,
       but this only partially addressed request concurrency and still
       suffers from head-of-line blocking.  Therefore, HTTP/1.0 and HTTP/1.1
       clients that need to make many requests use multiple connections to a
       server in order to achieve concurrency and thereby reduce latency.
    
       Furthermore, HTTP header fields are often repetitive and verbose,
       causing unnecessary network traffic as well as causing the initial
       TCP [TCP] congestion window to quickly fill.  This can result in
       excessive latency when multiple requests are made on a new TCP
       connection.
    
       HTTP/2 addresses these issues by defining an optimized mapping of
       HTTP's semantics to an underlying connection.  Specifically, it
       allows interleaving of request and response messages on the same
       connection and uses an efficient coding for HTTP header fields.  It
       also allows prioritization of requests, letting more important
       requests complete more quickly, further improving performance.
    
    
    
    
    
    
    
    
    
    Belshe, et al.               Standards Track                    [Page 4]

    
    RFC 7540                         HTTP/2                         May 2015
    
    
       The resulting protocol is more friendly to the network because fewer
       TCP connections can be used in comparison to HTTP/1.x.  This means
       less competition with other flows and longer-lived connections, which
       in turn lead to better utilization of available network capacity.
    
       Finally, HTTP/2 also enables more efficient processing of messages
       through use of binary message framing.
    

    HTTP 2.0_百度百科 https://baike.baidu.com/item/HTTP%202.0/12520156

    2.2 HTTP复用:HTTP/2.0提供了在单个连接上复用HTTP请求和响应的能力。 多个请求或响应可以同时在一个连接上使用流(发送第5节 )。 为了保持独立的流,流控制和优先级是必要的。

  • 相关阅读:
    BNUOJ 19792 Airport Express
    Poor Hanamichi
    BNUOJ 1206 A Plug for UNIX
    HDU 3507 Print Article
    一个程序猿试用有道云笔记VIP功能体验
    Cloud Foundry Session Affinity(Sticky Session)的实现
    SAP成都研究院廖婧:SAP C4C社交媒体集成概述
    SAP订单编排和流程增强概述
    在Kubernetes上运行SAP UI5应用(上)
    Docker入门系列之三:如何将dockerfile制作好的镜像发布到Docker hub上
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6656067.html
Copyright © 2020-2023  润新知