The web
ALPN
The TLS extension in which client and server agree on the protocol to speak inside, such as h2 or http/1.1.
ALPN (Application-Layer Protocol Negotiation) is the TLS extension in which client and server agree on the
protocol to speak inside the connection. The ClientHello lists the protocols the client speaks (h2, http/1.1;
h3 inside QUIC) and the server answers with its pick, so the first request is already in the right protocol.
curl -v shows ALPN: server accepted h2; a server that accepts only http/1.1 keeps every client on HTTP/1.1.
Read next
- TLS and certificates Encryption plus proof of identity: the server shows a certificate for the name, signed by a trusted authority.
- HTTP/2 HTTP's meaning in binary frames: many requests as streams over one TCP connection, headers compressed.
- SNI The site name sent in the clear at the start of a TLS handshake, so the server can pick a certificate.
- HTTP/3 and QUIC HTTP over QUIC: a transport on UDP port 443 with TLS 1.3 built in and streams that do not block each other.