Skip to content

Commit 4e30773

Browse files
authored
Merge pull request #209 from pet-forks/http2_websockets
Add docs for HTTP/2 WebSockets
2 parents 9ce94e2 + 2efe8b8 commit 4e30773

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

supporting-http2.html.md.erb

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ For more information, see [Starting HTTP/2 with Prior Knowledge](https://datatra
7171
Layer 7 load balancers terminate the incoming HTTP connection and initiate new HTTP connections to their back ends.
7272
For end-to-end HTTP/2 support, Layer 7 load balancers must have HTTP/2 enabled for both ingress and egress HTTP connections.
7373

74+
Gorouter and many Layer 7 load balancers do not support WebSockets over HTTP/2 ([RFC 8441](https://datatracker.ietf.org/doc/html/rfc8441)).
75+
WebSockets are used by <%= vars.app_runtime_abbr %> for streaming logs and metrics, in addition to apps that serve WebSocket traffic.
76+
Because of this, load balancers should be configured to forward WebSocket traffic over HTTP/1.1.
77+
Alternatively, you may use a Layer 4 load balancer for WebSockets traffic.
78+
For more information, see <a href='../adminguide/supporting-websockets.html'>Supporting WebSockets</a>.
79+
7480
For example, the HAProxy BOSH release contains the canonical example of how to set up HTTP/2 load balancing for <%= vars.app_runtime_abbr %>.
7581
See the [BOSH release for HAProxy](https://github.com/cloudfoundry-incubator/haproxy-boshrelease) on GitHub.
7682

supporting-websockets.html.md.erb

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ To form a WebSocket connection, the client sends an HTTP request that contains a
3939
These requests return a 503 error and a <code>X-Cf-Routererror
4040
route_service_unsupported</code> header.</p>
4141

42+
<p class="note"><strong>Note:</strong> Gorouter does not support WebSockets over HTTP/2 (<a href='https://datatracker.ietf.org/doc/html/rfc8441'>RFC 8441</a>).
43+
Your load balancer should always send WebSocket requests to Gorouter over HTTP/1.1.
44+
For more information, see <a href='../adminguide/supporting-http2.html#load-balancer'>Configuring HTTP/2 Support </a>.</p>
45+
4246
## <a id='modify'></a> Set Your Loggregator Port
4347

4448
<% if vars.platform_code == 'CF' %>

0 commit comments

Comments
 (0)