HTTP/2
What changed in HTTP 2.0
Why HTTP/1 is Slow
The response from the previous request must be received before the next request can be processed
In
HTTP 1.0, a newconnectionwas created for every request sent ->inefficientIn
HTTP 1.1, concepts ofpersistent connectionsandHTTP pipeliningwere introducedConnections could be
reused,And multiple requests could be sent to the server in advance
However, a problem arose in that responses could only be received
in the order the requests were sentIf the first request had an issue and its response was delayed, the responses of subsequent requests would also be delayed
-> `Head of Line Blocking`A
performance degradation phenomenonthat occurs when a head packet isdelayedin a packetqueuein the Network
Features of HTTP/2
HTTP
headerdatacompressionPrevents retransmission of
fieldsthat areduplicatedfrom previous headers, saving dataPreviously headers were
Plain Text, but HTTP/2 uses a header compression method calledHPACKto improve datatransmission efficiency
Server PushThe server can
send alongcertain files that will be needed, such as JS, CSS, and image files that the client did not request, in response to asingle HTTP request
Solved the
Head of Line Blockingproblem ofHTTP 1.xHTTP/2 reduced transmission time by sending multiple files in
parallel transmissionat onceMultiple requests and responses can be sent
in parallelover a single TCP connectionMultiple parallel
streamscan exist in a singleconnectionIf streams are mixed during transmission, they are
reassembledat the receiver using stream numbers
Stream priorityAs
framesfrom multiple streams can bemultiplexed, the need to specify stream priorities aroseThe client can use a
priority treeto specify stream processing priorities for the serverThe server sets bandwidth so that higher-priority responses are delivered to the client first
Last updated