NetworkingCoreOps
GoogleAtlassianSwiggyAsked in SRE, DevOps engineer and Cloud engineer roundsRead the full interview experience →PASS
GoogleAtlassianSwiggyAsked in SRE, DevOps engineer and Cloud engineer roundsRead the full interview experience →PASScurl to an internal service hangs and times out. Debug it layer by layer.
The scenario
From an app pod, curl https://billing.internal hangs for 30 seconds. Other services work.
Model answer
Reviewed by Rahul MenonGo up the stack and stop at the first layer that fails:
- 1DNSdig billing.internal (or nslookup). Does it resolve, and to the IP you expect?
- 2Routing and TCPnc -vz <ip> 443 or curl -v. A hang (not "connection refused") usually means a firewall, security group or network policy is dropping packets.
- 3TLSopenssl s_client -connect host:443 -servername host. Check the certificate chain, expiry and SNI.
- 4HTTPcurl -v shows the status, redirects and headers. A 30-second hang after connecting points to the backend being slow.
Refused = nothing listening. Timeout = dropped on the way. Telling those apart is half the job.
Common mistakes
- Jumping straight to the app logs
- Not distinguishing a timeout from connection refused