Opened 3 years ago

Last modified 3 years ago

#1992 new enhancement

Websocket over HTTP/2 support

Reported by: ckmichael8@… Owned by:
Priority: minor Milestone:
Component: nginx-module Version: 1.19.x
Keywords: Cc:
uname -a:
nginx -V: latest



Will NGINX ever support Websocket over HTTP/2?

Change History (1)

comment:1 by Maxim Dounin, 3 years ago

First of all, two basic things to understand:

  1. nginx does not talk Websocket protocol by itself, but rather provides a way to proxy HTTP/1.1 connection upgrades to backends;
  2. RFC 8441 defines a completely different way to establish websocket communication, using a CONNECT method.

Support for Websockets over HTTP/2 basically means that nginx will have to translate these CONNECT requests to HTTP/1.1 Upgrade requests somehow when proxying. While this might work, this doesn't look like a good solution.

Alternatively, we may consider passing such CONNECT requests as is to HTTP/2 backends (for example, when using grpc_pass), but this approach also have problems. In particular, this doesn't look compatible with HTTP/1.1 backends, which makes it hardly useful.

Overall, this is unlikely to happen unless there is a practical demand. For now it looks like there is no such demand.

For there record, it RFC 8441 currently seems to work somehow in Firefox ( and under a flag in Chrome (

Note: See TracTickets for help on using tickets.