Skip to content

Commit 457dd6d

Browse files
authored
[NW] Websocket Requests and Bandwidth
PCX-14082
1 parent 6db4636 commit 457dd6d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/content/docs/network/websockets.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ 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+
Based on the understanding of WebSocket nature of connections, you may be aware that it looks a bit different from the usual HTTP traffic in terms of requests and bandwidth. If you’re the Enterprise customer, you will have to take how Cloudflare measures its usage as the requests and bandwidth into account to estimate your usage correctly.
51+
52+
Cloudflare measures a single WebSocket connection as your usage in the following way:
53+
54+
- **Requests**: Cloudflare recognize only the initial upgrade request per WebSocket connection as a HTTP request. Even though you can send the bidirectional message stream through the established WebSocket connection, it’ll be recognized as the single long-lived HTTP request.
55+
56+
- **Bandwidth**: Cloudflare measures the data transfer sent from Cloudflare to the eyeball. This usually means that the message from WebSocket server behind Cloudflare to WebSocket client is subject to be measured as bandwidth.
57+
58+
Once each WebSocket connection is closed, you can see your aggregated usage about Websocket via [Traffic Analytics](/analytics/account-and-zone-analytics/zone-analytics//#traffic), [GraphQL Analytics API](/analytics/graphql-api/) and [HTTP requests logs](/logs/reference/log-fields/zone/http_requests/).
59+
4960
## Technical note
5061

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

0 commit comments

Comments
 (0)