Interview Prep/Ansible/Performance and Scale

Which SSH settings matter for performance and stability?

IntermediateProductionPerformance and Scale
Answer
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=120s -o ServerAliveInterval=30 -o ServerAliveCountMax=5
control_path_dir = ~/.ansible/cp
pipelining = True
retries = 3

ControlPersist reuses connections; keep-alives stop NAT or load balancers from dropping idle sessions during long tasks; retries re-attempts transient connection failures. Use a short control_path_dir, since socket paths have a length limit. On very slow or high-latency links, fewer and larger tasks matter more than any flag.

All Ansible questions Roadmap: Ansible

More on Performance and Scale