I worked with mosh for years to connect to servers on other continents. It was impossible to work otherwise. It only has two small warts: forwarding, and jump hosts.
The second is fixable/ish with an overlay network, but that isn’t always an option if you don’t control the network. I tried to solve this with socat but wasn’t able to configure it correctly - something about the socket reuse flag was very unhappy.
Yeah. I spend a majority of my working time on a slightly-unreliable Wifi network, and getting irritated that my keystrokes are lagging by some seconds and making it hard to e.g., edit the line I’m editing, is a daily occurrence. I literally had never heard of mosh before today, and when I tried it it was like the heavens opened up.
I still remember the professor in my networks class explaining how TCP worked, and then saying more or less:
Why doesn’t it send a detailed mapping of which sections of the stream have been received and which haven’t, allowing retransmission of only the dropped packets instead of what it does which is just backing up and blasting a whole new window’s worth every time a single packet is dropped? Well, I don’t know. It’d be a little more complex but the improvement in functionality would be so obviously worth it that it should. Don’t know what to tell you. Anyway, this is how it works…
I worked with mosh for years to connect to servers on other continents. It was impossible to work otherwise. It only has two small warts: forwarding, and jump hosts.
The second is fixable/ish with an overlay network, but that isn’t always an option if you don’t control the network. I tried to solve this with socat but wasn’t able to configure it correctly - something about the socket reuse flag was very unhappy.
Yeah. I spend a majority of my working time on a slightly-unreliable Wifi network, and getting irritated that my keystrokes are lagging by some seconds and making it hard to e.g., edit the line I’m editing, is a daily occurrence. I literally had never heard of mosh before today, and when I tried it it was like the heavens opened up.
TCP was never designed with wifi in mind. TCP retransmission was only ever meant to handle drops due to congestion, not lossy links.
Tmux is a wonderful complement to mosh. Together you get persistence even when your local client loses power (speaking from experience)
I still remember the professor in my networks class explaining how TCP worked, and then saying more or less:
Why doesn’t it send a detailed mapping of which sections of the stream have been received and which haven’t, allowing retransmission of only the dropped packets instead of what it does which is just backing up and blasting a whole new window’s worth every time a single packet is dropped? Well, I don’t know. It’d be a little more complex but the improvement in functionality would be so obviously worth it that it should. Don’t know what to tell you. Anyway, this is how it works…
TCP Selective Ack is very much a thing, but it does take extra memory so lots of TCP stacks exclude it or disable it by default.