4 ms·
There's a crucial difference in fact, which is that the peer you're defining connectedness to is a single well-defined peer that is directly connected to you, w
by dataflow 2y ago
There's a crucial difference in fact, which is that the peer you're defining connectedness to is a single well-defined peer that is directly connected to you, which "The Network" is not.
As for the analogy, uh, this ain't water. Monitor the line voltage or the fiber brightness or something, it'll tell you very quickly if the other endpoint is disconnected. It's up to the physical layer to provide a mechanism to detect disconnection, but it's not somehow impossible or rocket science...
- School-Cotton 2y agoWell, isn't that already how it works? If I physically unplug my ethernet cable, won't TCP-related syscalls start failing immediately?
- dataflow 2y agoProbably, but I don't know how the physical layers work underneath. But regardless, it's trivial to just monitor something constantly to ensure the connection is still there, you just need the hardware and protocol support.
- pjc50 2y agoModern Ethernet has what it calls "fast link pulses"; every 16ms there's some traffic to check. It's telephones that use voltage for hook detection. However, that only applies to the two ends of that cable, not between you and the datacentre on the other side of the world.
- remram 2y ago> I don't know how it works... it's trivial Come on now... And it is easy to monitor, it is just an application concern not a L3-L4 one.
- oasisaimlessly 2y agoWhat if I don't want all my SSH connections to drop when my WiFi stutters for a second when I open my microwave?
- pjc50 2y agoLast time I looked the behavior differed; some OSs will immediately reset TCP connections which were using an interface when it goes away, others will wait until a packet is attempted.
- iudqnolq 2y agoI ran into this with websockets. At least under certain browser/os pairs you won't ever receive a close event if you disconnect from wifi. I guess you need to manually monitor ping/pong messages and close it yourself after a timeout?
- Spivak 2y agoIn a packet-switched network there isn't one connection between you and your peer. Even if you had line monitoring that wouldn't be enough on its own to tell you that your packet can't get there -- "routing around the problem" isn't just a turn of phrase. On the opposite end networks are best-effort so even if the line is up you might get stuck in congestion which to you might as well be dropped. You can get the guarantees you want with a circuit switched network but there's a lot of trade-offs namely bandwidth and self-healing.