Skip to content

Commit 7048bd8

Browse files
kyouheicfangelampcostahyperlint-ai[bot]
authored andcommitted
[NW] Websocket Requests and Bandwidth (#17482)
* [NW] Websocket Requests and Bandwidth PCX-14082 * Update src/content/docs/network/websockets.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Apply suggestions from code review * Update src/content/docs/network/websockets.mdx * Update src/content/docs/network/websockets.mdx --------- Co-authored-by: angelampcosta <[email protected]> Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
1 parent 0f578c8 commit 7048bd8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/content/docs/network/websockets.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ Cloudflare also supports [ASP.NET SignalR](http://signalr.net/), which helps neg
4646

4747
WebSockets are supported on all Cloudflare plans.
4848

49+
## Requests and Bandwidth measurement
50+
51+
Given the nature of WebSocket connections, you may notice they differ from typical HTTP traffic in terms of requests and bandwidth usage. If you are an Enterprise customer, it is important to consider how Cloudflare measures requests and bandwidth to accurately estimate your usage.
52+
53+
Cloudflare measures a single WebSocket connection in the following way:
54+
55+
- **Requests**: Cloudflare recognizes only the initial upgrade request per WebSocket connection as an HTTP request. Even though you can send a bidirectional message stream through the established WebSocket connection, it will be counted as a single long-lived HTTP request.
56+
57+
- **Bandwidth**: Cloudflare measures data transfer sent from Cloudflare to the client. This typically means that messages from the WebSocket server behind Cloudflare to the WebSocket client are counted towards bandwidth usage.
58+
59+
Once a WebSocket connection is closed, you can view your aggregated WebSocket usage through [Traffic Analytics](/analytics/account-and-zone-analytics/zone-analytics/#traffic), the [GraphQL Analytics API](/analytics/graphql-api/), and [HTTP requests logs](/logs/reference/log-fields/zone/http_requests/).
60+
4961
## Technical note
5062

5163
When Cloudflare releases new code to its global network, we may restart servers, which terminates WebSockets connections.

0 commit comments

Comments
 (0)