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

docs: improving websocket docs #8156

Merged
merged 3 commits into from
Sep 9, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/root/intro/arch_overview/http/websocket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,18 @@ downstream_cx_upgrades_total and downstream_cx_upgrades_active
Handling H2 hops
^^^^^^^^^^^^^^^^

Envoy supports tunneling WebSockets over H2 streams for deployments that prefer a uniform
H2 mesh throughout; this enables, for example, a deployment of the form:
While H2 support for WebSockets is off by default, Envoy does supports tunneling WebSockets over
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: prefer HTTP/2 over H2 in docs (I know this was there before, if you could search and replace it would be great)
Nit: s/does supports/does support/

H2 streams for deployments that prefer a uniform H2 mesh throughout; this enables, for example,
a deployment of the form:

[Client] ---- HTTP/1.1 ---- [Front Envoy] ---- HTTP/2 ---- [Sidecar Envoy ---- H1 ---- App]

In this case, if a client is for example using WebSocket, we want the Websocket to arrive at the
upstream server functionally intact, which means it needs to traverse the HTTP/2 hop.

This is accomplished via
`extended CONNECT <https://tools.ietf.org/html/rfc8441>`_ support. The
This is accomplished via `extended CONNECT <https://tools.ietf.org/html/rfc8441>`_ support,
turned on by setting :ref:`allow_connect <envoy_api_field_core.Http2ProtocolOptions.allow_connect>`
true at the second layer Envoy. The
WebSocket request will be transformed into an HTTP/2 CONNECT stream, with :protocol header
indicating the original upgrade, traverse the HTTP/2 hop, and be downgraded back into an HTTP/1
WebSocket Upgrade. This same Upgrade-CONNECT-Upgrade transformation will be performed on any
Expand Down