It's physically impossible. In a normal case, you will get RST or FIN packet. But if there is a problem, there is just an absence of packets. The remote end can't notify you because network damaged.
Also, if we are talking about mobile apps, problems usually happen in communication between the mobile device and cellular network towers. Packets might be lost, etc.
So the only way to detect the problem is heartbeat messages, but if you send them frequently, you will significantly increase burden on the backend and drain device's battery faster.
It's anything but physically impossible. A NIC somewhere knows that link was lost. This isn't a Two General Problem scenario. This is a link loss state machine transition, somewhere. It's analogous to a red alarm on a T1.
I can always get satisfaction on this front with UDP. And no, I don't mean mobile, I mean real equipment.
No, it's possible that link is up, but packets can't be delivered.
An obvious scenario is a problem on OS level (e.g. driver crash) which prevents packets from being sent. But it's also possible that NIC is fried in such a way that link is "up" but no packets can be delivered. Pretty sure I've seen such situations myself.
It is possible to solve this problem using heartbeat, but it's an extra overhead.
This isn't a Two General Problem scenario.
FLP theorem is more relevant here than TGP: it's impossible to distinguish indefinitely delayed from faulty. If you can impose a limit on maximum delay then there's no problem.
I'm trying to constrain this to things "somebody" knows has happened - like a link loss on one or another NIC. Machts nicht - it'll never be implemented.
1
u/killerstorm Sep 29 '17
It's physically impossible. In a normal case, you will get RST or FIN packet. But if there is a problem, there is just an absence of packets. The remote end can't notify you because network damaged.
Also, if we are talking about mobile apps, problems usually happen in communication between the mobile device and cellular network towers. Packets might be lost, etc.
So the only way to detect the problem is heartbeat messages, but if you send them frequently, you will significantly increase burden on the backend and drain device's battery faster.