Websocket proxy randomly drops connection for some users
What feature, service or problem is this related to?
I don’t know
What are the steps to reproduce the issue?
Hello,
We use the CF proxy to our game server which runs on websockets. Earlier, we connected directly through the IP address and had no issues but ever since I added CF proxy some players have random disconnections or aren’t even able to connect successfully. Is there any setting or configuration to fix this?
I need to use CF for the DDoS protection.
Hello, where can I see this limit? I’m on the pro plan
Yes, I already have ping pong enabled, only some people get disconnected randomly.
Also, how frequent are the restarts? Thanks
Thanks again, one last thing, I tried reading the docs but there’s nothing mentioned.
How many connections does “medium” mean? So if it’s less I could upgrade to the business plan.
What plan do I need for WebSockets support on my site?
Cloudflare plan
Volume of concurrent connections
Example use case
Free
Low
Hobby or demonstration site
Pro
Medium
Project or small business
Business
High
Important to your operations
Enterprise
Custom
Mission critical and significant volume
Why are these volume limits not specific numbers?
Cloudflare powers several high-volume, mission critical WebSockets applications for Enterprise customers.
Since introducing WebSockets support in 2014, Cloudflare has nearly tripled its network map, going from 28 locations to over 150 (as mid-2018). In all locations, we’ve added compute resources and multiple Tier 1 bandwidth providers.
We’re confident in our ability to offer WebSockets to all our customers now, but we’re also thoughtful about allocating resources – including WebSockets connections – by plan level. So, we’re starting with guidelines, and we’ll learn from our customers’ adoption.
We enable modern technologies which make the Internet better. The best way to do that is let customers play, grow, and thrive.
What happens if my site exceeds the number of concurrent WebSockets connections that Cloudflare expects?
Immediately, nothing. Cloudflare will allow occasional spikes in usage beyond our guidelines and we will not apply unnecessary limits.
Repeated spikes or high continued usage will prompt a dialogue: we’ll reach out to learn more about your application. We will not impose limit errors for any application without contacting the customer unless we suspect that abuse or an attack is involved.
Customers whose usage claims a disproportionate percentage of resources for their current plan level may be asked to upgrade to the plan level that matches their needs.
Ok so I haven’t received any notification yet, I guess I’m safe. We have at most 1200 players active at once. I wonder what causes the disconnects for some random players then.
People may experience WebSocket disconnections due to network issues, instability, server overload or idle timeouts. In the worst case, the disconnection may be caused by CF Restarts which means you don’t have any control over it, but I don’t think this should happen so much, after all, it could harm several customers who depend on a stable WebSocket connection.
That’s a pity. Since this seems to be critical for your business, I would advise that you open a support ticket for your case and see if the issue is at CF’s side with CF Team. Sometimes they’re here at the community, so, if you’re lucky they respond you here. But it’s best to not count with the luck and bring it directly to them.