httpwebsockethttp3

Is WebSocket compatible with HTTP/3


The upcoming HTTP/3 standard is no longer based on TCP, but on the QUIC protocol. WebSocket is based on TCP and is initiated as HTTP update.

Is a WebSocket connection initiated as HTTP/3 update based on QUIC instead of TCP? Or is it not possible to update a HTTP/3 connection to a WebSocket connection?


Solution

  • UPDATE: 2023: as of the writing of this post there is a relatively new specification RFC9220 for websockets built on top of HTTP3 https://datatracker.ietf.org/doc/rfc9220/ .


    Since this is the top search result for "http3 websockets", I want to keep the answers up-to-date.

    As of December 2021, there is now an IETF draft that amends RFC8441 (Bootstrapping WebSockets with HTTP/2) with the adjustments necessary for HTTP/3. If the draft is accepted, there will be a standardized way for WebSockets to be initiated over HTTP/3.

    The draft is on its second revision and will expire in July 2022 if there are no further revisions and it is not accepted by that time.