HTTP (1/2/3)

1 minute read

1.

Browser looks up IP Address in The Domain Name System (DNS) Cache (Browser cache for short periods of time if browser cache is not present, then it asks the OS Cache)

if not found within the OS cache, Browser looks up IP (using recursive DNS Lookup) on the internet in DNS Resolver (keeps making chain of requests until the IP Address is resolved)

After address is resolved,

2.

Browse establishes a TCP connection with the server TCP three-way handshake. Involves many round trips so maintained with keep alive connection (reuse an established TCP connection) to remain

for HTTPS the handshake involves SSH/TLS handshake to establish encrypted connection between the browser and the server.

  • Browser may use SSL Session resumption to reduce the code of re connections

3.

Finally, the browser sends HTTP requests to the server, over the estab;ished TCP connection

HTTP

HOL blocking

when the number of allowed parallel requests (with more resources to download for each request, via the use of Pipelining, to allow clients to send multiple requests over a single TCP connection without waiting for corresponding responses) in the browser is used up, subsequent requests need to wait for the former ones to complete.

HTTP 2.0 - addresses HOL issue through request multiplexing, which eliminates HOL blocking at the application layer, but HOL still exists at the transport (TCP) layer.

request multiplexing : Allows multiple requests and responses to be sent and received in parallel over a single TCP connection

HTTP “streams”: an abstraction that allows multiplexing different HTTP exchanges onto the same TCP connection.

Each stream doesn’t need to be sent in order.

HOL Blocking at the Transport Layer (TCP): Despite these improvements, HOL blocking can still occur at the transport layer (TCP):

TCP Characteristics: TCP is a reliable, ordered protocol that ensures data integrity and sequence.

It guarantees that data sent is received correctly and in order.

Packet Loss or Delay: If a TCP packet is lost or delayed (e.g., due to network congestion), TCP may hold back subsequent packets (including those from different streams) until the missing packet is retransmitted or acknowledged.

This waiting can cause HOL blocking at the TCP layer.

HTTP/3 - published in June 2022

HTTP/3 uses QUIC (based on UDP) instead of TCP for the underlying transport protocol, thus removing HOL blocking in the transport layer.