Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC 8441 support: WebSockets over h2, h2c #54

Open
riptl opened this issue Dec 22, 2020 · 0 comments
Open

RFC 8441 support: WebSockets over h2, h2c #54

riptl opened this issue Dec 22, 2020 · 0 comments

Comments

@riptl
Copy link

riptl commented Dec 22, 2020

Feature Request: Introduce support for WebSockets over HTTP/2 (h2 and h2c) for the server and client.

The use-case is mainly reducing the TCP connection count by leveraging HTTP/2 multiplexing. For example, a WebSocket reverse proxy could multiplex many incoming WebSockets to a single outgoing HTTP/2 connection.

Specification: RFC 8441: Bootstrapping WebSockets with HTTP/2

For the WebSocket server this requires support in ngx.req.connect.

For the WebSocket client, it's much more complicated. I think without core modifications, the only way to multiplex is by having an NGINX light thread that runs a pure-Lua HTTP/2 implementation over cosockets, and then doing cross-coroutine IPC with this thread to create WebSockets and send/receive messages. lua-resty-http2 looks like a great candidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant