HTTP/2
Many efforts were done to address HTTP/1.1 issues. HTTP/2 was originated out of those esp. Google's SPDY protocol. HTTP/2 extends HTTP/1.1 and doesn't replace it and is fully backward compatible. It is implementation change while keeping the interface same.
Major differences from HTTP/1.1:
- Server Push - allows servers to push additional content for page loading even without browser requesting those.
- Request Multiplexing - Allow multiple requests over same connection.
- Request prioritization
- Header compression
- Binary Message Framing - More efficient processing of messages through use of binary message framing.
For more details see https://developers.google.com/web/fundamentals/performance/http2
There was one major problem with HTTP/1.1 , which was called "head-of-line blocking" , HTTP/2 fixed it by multiplexing & prioritizing the requests over connection but the problem still remained at TCP . One lost packet in the TCP stream makes all streams wait until that package is re-transmitted and received.
This is being addressed in HTTP/3. HTTP/3 is being implemented using QUIC ( instead of TCP & TLS ) protocol which is "TCP like" but implemented over UDP where each stream is independent so a lost packet only halts that stream.
Connection(1)->(n)Stream(1)->(n)Message(1)->(n)Frame
A message corresponds to HTTP request/response. A stream is bidirectional flow of bytes within an established connection which can carry one or more messages. Ability to multiplex multiple streams in parallel and dividing each messages into multiple binary frames before transmitting and joining them back into a message at the other end is the single biggest change from HTTP/1.1 and basis for all major performance improvements. Frames from different streams may be interleaved and then reassembled via the embedded stream identifier in the header of each frame.
Comments
Post a Comment