Code Room
On-callHardoc-g182
Subject Ephemeral port exhaustionLevel Senior–Staff~40 minCommon in Reliability & on-call interviewsIndustries Software development

Question

A high-throughput billing worker that makes many short-lived HTTPS calls to a payment processor starts logging 'cannot assign requested address' (EADDRNOTAVAIL) on outbound connects at peak, ~16:00 daily. The processor's endpoint and the worker IP are fixed. `ss -s` shows ~28,000 sockets in TIME_WAIT to a single (dst IP, dst port 443) tuple. `net.ipv4.ip_local_port_range` is the default 32768–60999. The team recently 'optimized' an HTTP client by disabling keep-alive to 'avoid stale connections' after an unrelated incident. Throughput is up 20% week over week. Triage and fix.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

Diagram & narrate the incident
Loading whiteboard…
Run or narrate your approach, then ask the coach.