Networking for a Backend Engineer & Application Support

Referência · Networking for a Backend Engineer & Application Support

The Failure Alphabet

The five signatures every "A can't reach B" failure reduces to. Name the signature → you have the mechanism, what it rules out, and the next tool. This is the course spine; every later unit deep-dives one row.

The five signatures

Signaturecurl exitMechanismRules outUsual culpritNext tool
refused7RST from a closed port — host up, packet arrived, nothing listeningnetwork path, firewallservice down, wrong portss -tlnp on target
timeout28packet silently dropped, no reply"actively refused"firewall, routing, dead hosthost-up check, path
reset56RST mid-stream — a live connection torn down"app never connected"idle timeout, crash, proxylogs, capture (Unit 9)
hangconnected, no response byte returnsDNS, connect, TLS (all passed)app stuck, reply lostcurl -w TTFB (Unit 1)
resolves-wrong6name maps to wrong IP or noneeverything above resolutionDNS record, resolver, stale cachedig (Unit 3)

The core distinction

RST is a message; silence is not.

  • An RST (refused, reset) means a live host answered with a refusal — the packet arrived.
  • Silence (timeout) means the packet vanished — dropped by a firewall, lost in routing, or swallowed by a dead host.

That one fork routes the ticket: refused/reset → app or port; timeout → path or firewall.

Reading ss (the refused follow-up)

ss -tlnp     # TCP, listening, numeric, process → who is accepting connections?
ss -tnp      # drop the l → who is connected right now?
  • A LISTEN line present → a process owns the port. Absent → nothing listening (this is what "refused" proves).
  • An ESTAB line → a live 4-tuple (local IP:port ↔ peer IP:port); the high peer port is the client's ephemeral port.

Closing states (named; forensics in Unit 9)

  • TIME_WAIT — the side that closed first, briefly waiting out stray packets. Normal.
  • CLOSE_WAIT — peer sent FIN, local app hasn't closed. Piles of these = an app bug.

Taught in Unit 2 (lessons 0004, 0005, 0006). Each row deepens into its own unit.