Intermittent WebSocket connection failures when routed through Fastly

Hi community,

We’ve encountered an intermittent issue with WebSocket connections when routing traffic through Fastly. The behavior is consistent and reproducible mostly in Google Chrome, while all other browsers (e.g., Safari, Firefox, Brave) work as expected.

Issue Summary

When a WebSocket connection is first established, it successfully upgrades (HTTP 101) and works normally. However, any subsequent WebSocket connection attempts from the same client fail to open.

This pattern repeats consistently:

  • The first connection always succeeds.

  • Subsequent attempts fail immediately.

  • The issue occurs mostly when requests are routed through Fastly.

  • When bypassing Fastly and connecting directly to the origin, all WebSocket connections work properly across all browsers.

Technical Details

  • In the failing cases, the connection attempt completes in about 60–70 ms, which is far too quick for a genuine WebSocket handshake.

  • It feels like these connections are being interrupted or terminated early, somewhere within the Fastly layer or a related intermediary component, rather than being passed through to the origin server.

  • The difference in timing is significant: failed connections complete in ~60–70 ms, while successful handshakes take ~1.6–1.9 seconds. This indicates that the failed requests likely do not complete the full upgrade sequence.

Request

Could you please let us know if this is a known issue or if there have been any recent reports of WebSocket connection failures or timing anomalies when routed through Fastly?
Any insight into potential root causes or conditions that could trigger this behavior would be greatly appreciated.

Thank you for your help and time!

1 Like

Hey @Limpanter – we’re not aware of any broader issues with WebSockets. If we did we’d put that information on fastlystatus.com. Your issue might be specific to your use case, so I’d recommend you create a ticket at support.fastly.com so our team to troubleshoot and specifics related to your workloads that might be confidential.