Concepts / The web

The web

ALPN

Also called Application-Layer Protocol Negotiation, h2, http/1.1

The TLS extension in which client and server agree on the protocol to speak inside, such as h2 or http/1.1.

The protocol is agreed inside the TLS handshake
The protocol is agreed inside the TLS handshake

The client lists the protocols it speaks in its ClientHello and the server picks one in its reply. No extra round trip is spent, and the first request is already in the protocol picked.

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.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab