Interview Prep/Networking/Connectivity: refused, timed out, no route

Intermittent `Connection timed out` to a backend that is up and healthy, only under load.

AdvancedTroubleshootingConnectivity: refused, timed out, no route
Answer

Likely causes → SYN queue or accept queue overflow on the server, conntrack table full on a hop, NAT port exhaustion, or tcp_tw_recycle-style timestamp issues (old kernels) behind NAT.

Diagnose →

# server
nstat -az | grep -E 'ListenOverflows|ListenDrops|TcpExtSyncookies'
ss -ltn 'sport = :8080'     # Recv-Q near Send-Q = accept backlog full
dmesg -T | grep -E 'conntrack|SYN flooding'

Fix → Raise the app's listen backlog and net.core.somaxconn, add workers so accept() keeps up, raise nf_conntrack_max, or spread egress across more NAT IPs.

Prevent → Alert on ListenOverflows and conntrack usage; load-test with realistic connection churn.

All Networking questions Roadmap: Networking for DevOps

More on Connectivity: refused, timed out, no route