Throughput for a single IP seemingly limited to ~40 MiB/s

Hi everyone!

I’m currently experimenting with WebSockets in Cloudflare Workers and I’ve come across an issue.

My script, which has no purpose other than to test the limits of WebSockets on Workers, is quite simple. Each time the Worker receives a message, it responds with exactly 1 MiB of null bytes.

If I connect using a single public IP, no matter how many concurrent WebSocket connections I have open, I am unable to download at more than ~40 MiB/s.

I initially thought this might be an issue with my connection. However, when I connected through a SOCKS5 proxy and therefore spread the load across multiple public IPs, I was able to download at ~110 MiB/s, maxing out my ISP connection.

Is Cloudflare limiting the total throughput of a single IP, or could there be another explanation?

Thanks a lot in advance! :slightly_smiling_face:

Have you tried without workers? Directly to your server?

Hi @nanankcornering,

Cloudflare Workers is my server. The WebSocket connection is between the Worker and the Client - there is no origin server.

@MoreHelp #2253597

Then looks like Workers have throughput limit.

I’m able to achieve as high as ~700Mbit/s over Websocket from/to my server on a single WS connection.

It actually makes sense with the limit, as Workers runs on Cloudflare’s server, and it’s not only you who are using Workers, there are other users & enterprise users too. Compared to reverse proxy where there are no code running in CF’s edge. Remember, more throughput = more CPU usage

Is this WebSocket connection going through Cloudflare?

Yes, with Argo tunnel (uses websocket too)