HTTP/2 goals
- reduce perceived latency by enabling request and response multiplexing over a single TCP conn.
- provide request prioritization and server push
- provide efficient compression of HTTP header fields.
- get rid of(or reduce) parallel TCP connections for transporting a single Web page.
- this reduces the number of sockets that need to be open and maintained at servers
- allows TCP congestion control to operate as intended.
HTTP method, status codes, URLs, header fields: no change
INSTEAD, HTTP/2는 client와 server사이에서 데이터의 형식과 전송되는 방식이 바뀐다.
As HTTP/1.1 uses persistent TCP connections, all the objects in a Web page are sent in a single TCP connection. And this has a Head of Line(HOL) blocking problem.
HOL Blocking
example: large video clip blocks the small objects behind it.
http/1.1 browsers handle this problem by opening multiple parallel TCP connections.
Framing
solution for HOL blocking:
- break each msg into small frames & interleave the request and response message on the same TCP connection
- FRAME INTERLEAVING: after sending one frame from the video clip, the first frames of each of the small objects are sent → user-perceived delay are significantly decreased.
- framing is done by the framing sub-layer of the HTTP/2 protocol.
Message Prioritization
- allows developers to customize the relative priority of requests to better optimize application performance
- by assigning weight between 1-256 to each message, 256: highest priority
Another feature
- server sends multiple responses for a single client request
- server can push additional objects to the client before the client requests
- server push: eliminates extra latency
QUIC
: new transport protocal that is implemented in the application layer over UDP protocol.
- message multiplexing(interleaving)
- per-stream flow control
- low-latency connection establishment
- 따끈따끈한 신상