Web Technology Basics
Which of the following correctly describes HTTP/2 and HTTP/3?
- AHTTP/2 can handle several requests in parallel over one TCP connection, but a packet loss can make other streams wait too; HTTP/3 reduces this with QUIC over UDP
- BHTTP/2 uses messages in the same text format as HTTP/1.1 and opens a new TCP connection in parallel for each request, so that several resources can be received at once
- CHTTP/3 runs over TCP like HTTP/2 and only changes the header compression method; the effect of packet loss is the same as in HTTP/2, and it does not use UDP
Show answer and explanation
Answer: A. HTTP/2 can handle several requests in parallel over one TCP connection, but a packet loss can make other streams wait too; HTTP/3 reduces this with QUIC over UDP
Even HTTP/1.1 can reuse one TCP connection with persistent connections (keep-alive), but responses on one connection are received one at a time in order, so browsers opened several connections in parallel. HTTP/2 splits messages into binary frames and multiplexes several streams over one TCP connection so they are sent in parallel. However, because TCP delivers its byte stream in order, when a single packet is lost, data of unrelated streams must also wait until the retransmission arrives (head-of-line blocking). HTTP/3 uses QUIC, which runs over UDP and manages ordering per stream, so the effect of a loss stays within that stream.
- A. Correct. HTTP/2 can send in parallel by multiplexing, but a loss in TCP affects all streams. HTTP/3 reduced this with QUIC.
- B. HTTP/2 uses binary frames and multiplexes several requests over one connection. Opening new connections is actually slower.
- C. HTTP/3 uses QUIC, which runs over UDP, not TCP.