We recently add Cloudflare to the frontend of our AWS Application Load Balancer.
The backend app servers run websockets for RabbitMQ connections. Some of our users are seeing intermittent errors/problems when going through Cloudflare. Such as–
• WebSocket connection to 'wss://mydomain.com/socket.i' failed.: Error during Websocket handshake: Unexpected response code: 400 • Error 521 • Slow network is detected.
Most commonly, the users experiencing these problems are in the Philippines. Our AWS app servers are in US E. Virginia. So far, I haven’t been able to recreate the problems as a US user. No one has experienced these errors when going directly to our AWS Load Balancer URL.
I confirmed Network>Websockets are enabled for our account. Our CloudFlare plan is Pro, which allows Medium concurrent Websocket connections. We aren’t currently experiencing large amounts of traffic.
Any advice would be appreciated.