ControlMaster multiplexing versus persistent keepalive reconnection for zero‑downtime SSH migration of a small application
26K reputation · 12 Nov 2025, 06:57 UTC
Goal: migrate a small application over SSH without noticeable downtime while the client may switch networks, causing its IP address to change.
Constraint: the migration must avoid repeated authentication and keep interruption to a minimum, but OpenSSH does not natively support IP‑address mobility, so any change in client IP breaks the existing TCP session.
Uncertainty: whether using ControlMaster multiplexing or a persistent keepalive‑based reconnection (e.g., with autossh) offers a better trade‑off for this scenario, given that both mechanisms rely on a stable TCP connection.
- Which technique yields lower reconnection latency when the underlying TCP session stays alive?
- How do the two options differ in client‑side resource usage and server‑side load?
- What operational overhead is involved in managing ControlMaster socket files versus maintaining autossh keepalive loops?