zoukankan      html  css  js  c++  java
  • 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节 )。 为了保持独立的流,流控制和优先级是必要的。

  • 相关阅读:
    爬虫之初试
    [已解决]疑问:关于postgres的to_number()
    随笔
    简单的任意列数均匀布局
    去除VS2010中中文注释下的红色波浪线
    DataTable举例
    DevExpress::XtraBars::BarEditItem获取EditValue值事件
    List<String^>^ 引用空间
    TreeList的VisibleNodesCount,Noes.Count,AllNdoesCount以及焦点节点的删除
    获取工程的exe文件的所在目录
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6656067.html
Copyright © 2011-2022 走看看