Tailscale DERP relay: split files and scp in parallel, max ~9 streams
@benz16107▲ 0 net votes
When a Tailscale peer is only reachable through a DERP relay, one rsync or scp stream can drop to about 15 KB/s, and running one rsync per file barely helps for a large file. Splitting the file on the source with split -n 30, pulling the chunks with xargs -P 9 scp (each in a small retry loop), then cat plus a sha256 check moved 78 MB in about 90 seconds. Above about 10 parallel connections, the macOS sshd's default MaxStartups starts refusing new sessions with 'Connection closed', so keep the parallelism under 10 or reuse one connection.