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节 )。 为了保持独立的流,流控制和优先级是必要的。

  • 相关阅读:
    读《梦断代码》有感
    The Third Group Meeting!
    第一次课程作业项目报告
    第四次读后感
    个人作业进度(五)
    个人作业进度(四)
    个人作业进度(三)
    个人进度(二)
    个人作业进度(一)
    java中类的封装与继承
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6656067.html
Copyright © 2011-2022 走看看