Networkinghypertext transfer protocolhttp/2

HTTP

Definition

HTTP is a stateless application-layer protocol in which a client sends a request (method, path, headers, optional body) and the server returns a response (status code, headers, optional body).

In practice

HTTP semantics drive system behaviour: GET, PUT and DELETE are defined as idempotent, cache headers control CDNs and browsers, and status codes tell clients whether retrying makes sense (503 with Retry-After) or not (400).

HTTP/1.1 sends one request at a time per connection, HTTP/2 multiplexes many streams over one TCP connection, and HTTP/3 runs over QUIC on UDP to avoid TCP head-of-line blocking. The semantics stay the same across versions.

Example

A client receiving 429 Too Many Requests with Retry-After: 30 should wait 30 seconds before trying again instead of retrying immediately.