System DesignTradeoffs in Production·16 min read
TCP Keep-Alive vs Application Heartbeat — Three Different Things Called “Keep-Alive”
Kernel TCP keep-alive probes the network path; app heartbeats prove the peer process is serving; HTTP Connection: keep-alive only reuses sockets. Why NAT, load balancers, and firewalls still drop “idle” long-lived connections, how defaults like Linux’s multi-hour timers compare to prod WebSocket patterns, and when you really need both mechanisms.
TCPNetworkingWebSocketsNATRead →