I have recently been traveling. On my way I experienced 3 different bad connections:
- Long latency (1000-10000 ms with around 10% loss)
- High packet loss (50% loss)
- Connection flapping two hops from me (40 seconds with 20% loss, 80 seconds with 100% loss)
The experience of the connection in the packet loss scenario can be improved by retransmitting every packet:
for IF in `ifconfig -a|grep '^[a-z]'|field 1`; do sudo tc qdisc del dev $IF root sudo tc qdisc add dev $IF root netem duplicate 100% reorder 100% gap 1 delay 300ms done
This typically works if the packet loss is caused by lossy wireless connection and not by congestion.
How can I improve the experience in the other scenarios?
For the flapping I imagine it would be better have some kind of monitoring of the connection 3 (or more) hops away, and to pile up outgoing packets as soon as the system determines that the connection is down; instead of sending packets that we know will never reach their destination. I do not know how to do that, though.