Alt-svc

The alternate service (Alt-svc:) header and its corresponding ALT-SVC HTTP/2frame are not specifically created for QUIC or HTTP/3. They are part of analready designed and created mechanism for a server to tell a client: “look,I run the same service on THIS HOST using THIS PROTOCOL on THIS PORT”. Seedetails in RFC 7838.

A client that receives such an Alt-svc response is then advised to, if itsupports and wants to, connect to that given other host in parallel in thebackground - using the specified protocol - and if it is successful switch itsoperations over to that instead of the initial connection.

If the initial connection uses HTTP/2 or even HTTP/1, the server can respondand tell the client that it can connect back and try HTTP/3. It could be tothe same host or to another one that knows how to serve that origin. Theinformation given in such an Alt-svc response has an expiry timer, makingclients able to direct subsequent connections and requests directly to thealternative host using the suggested alternative protocol, for a certainperiod of time.

Example

An HTTP server includes an Alt-Svc: header in its response:

  1. Alt-Svc: h3=":50781"

This indicates that HTTP/3 is available on UDP port 50781 at the same host namethat was used to get this response.

A client can then attempt to setup a QUIC connection to that destination andif successful, continue communicating with the origin like that instead of theinitial HTTP version.