Categories
Posts

HTTP/2 and WebSocket

With HTTP/2 marching towards production environments, you might be wondering how WebSocket fits in. The HTTPbis working group was thinking about that too:

The WebSocket protocol enables two-way communication between a client running untrusted code in a controlled environment to a remote host that has opted-in to communications from that code. Since it requires one TCP connection for every WebSocket connection, having multiple WebSocket connections between the same client and the same server is inefficient. On the other hand, HTTP/2 specifies a fast, secure, multiplexed framing protocol. This document provides bi-directional multiplexed communication by layering WebSocket on top of HTTP/2.

From draft-hirano-httpbis-websocket-over-http2-01.

The draft expired back on February 13, 2015 and I haven’t seen any other significant discussions in this area. At this point there doesn’t appear to be any momentum to come up with a way to leverage HTTP/2 in future versions of the WebSocket protocol.

Leave a Reply

Your email address will not be published. Required fields are marked *