aklivity / zilla

🦎 A multi-protocol edge & service proxy. Seamlessly interface web apps, IoT clients, & microservices to Apache Kafka® via declaratively defined, stateless APIs.
https://docs.aklivity.io/zilla
Other
543 stars 50 forks source link

Support `websocket` over `http/2` #115

Open jfallows opened 2 years ago

jfallows commented 2 years ago

websocket predates http/2 and has historically relied on http/1.1 upgrade to unlock full-duplex bidirectional communication over a separate connection.

RFC 8441: Bootstrapping WebSockets with HTTP/2 adds support for websockets over the shared http/2 transport, without creating a separate connection.

Implementing support for this involves awareness at the ws binding of the underlying http version, such as http/1.1 or h2, as the required websocket handshake headers differ between http versions.

We likely need to enhance http binding to expose version in application stream HttpBeginEx to let ws binding behave correctly for either http/1.1 or h2.

Chrome Status Firefox Status

drymus commented 1 year ago

Hi @jfallows. I would like to take a stab at this. Please assign it to me.

I'm somewhat familiar with websockets over http/1.1 and the http/2 protocol at a high level. My plan for now is to read the main http/2 RFCs and the websocket RFC you referenced above. Will also need some help to understand the inner workings of zilla and set up my development env.