taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.73k stars 193 forks source link

Carrier-grade NAT may affect the stability of websocket connections #441

Open danielsz opened 8 months ago

danielsz commented 8 months ago

Carrier-grade NAT is a practice by ISPs that allows them to share small pools of public addresses among many end users. I believe that in certain circumstances, carrier-grade NAT may affect the stability of webcocket connections, possibly in non-trivial developer setups or otherwise. Some time ago, I was observing constant interruptions of websocket connections. I called my ISP and they told me that they were aware of the problem, explained it was due to carrier-grade NAT, and upgraded my subscription. No more carrier-grade NAT, now I get assigned a public IP address that is not shared (still dynamic though), and that was the end of the problem. Unfortunately, I am fuzzy about the details since that was some time ago.

ptaoussanis commented 8 months ago

@danielsz Thanks Daniel, much appreciated! 🙏

I'll do some digging into this the next time I'm on batched Sente work.

In the meantime, I'd like to please ask anyone else that may have experienced something similar to 👍 and/or share extra details if they have any. Thanks!

ptaoussanis commented 8 months ago

@danielsz One question so long: when you observed the flaky WebSocket behaviour - was it actually in the context of Sente, or elsewhere?

danielsz commented 8 months ago

Yes, in the context of Sente, developing a project. The crucial part I don't remember is if it was all websocket connections or just my developer environment which was behind a tunnel.

ptaoussanis commented 8 months ago

For reference, there was another report recently that suggested an ISP doing "traffic filtering". Unfortunately didn't get any concrete details, but mentioning here in case it's related.