Skip to content
matthewcm.dev

    ↑ ↓ move · ↵ open · tab scopeopen graph →

    Fallacies of Distributed Computing

    Eight assumptions everyone makes about networks, and every one of them is false. A checklist for any design that crosses a process boundary, including the browser.

    Evergreentended planted 2 min read
    On this page

    In the 1990s, engineers at Sun Microsystems (L Peter Deutsch and others) wrote down the assumptions that newcomers to distributed systems make, and which eventually burn them. Thirty years on, the list hasn’t aged a day.

    The eight fallacies

    FallacyRealityWhat to do about it
    1. The network is reliablePackets drop, connections reset, cables get cutTimeouts, retries with backoff, idempotent operations (Message Delivery Semantics)
    2. Latency is zeroEvery hop costs milliseconds; a chatty design costs secondsBatch calls, cache, avoid N+1 requests
    3. Bandwidth is infinitePayloads compete for limited pipes, especially on mobilePaginate, compress, send diffs
    4. The network is secureAnything on the wire can be read or tampered withTLS everywhere, authenticate every hop
    5. Topology doesn’t changeServers come and go; deploys move everythingService discovery; clients that reconnect
    6. There is one administratorMany teams, vendors and policies share the pathClear ownership, contracts, observability
    7. Transport cost is zeroSerialisation, egress fees and infrastructure all costMeasure it; choose formats deliberately
    8. The network is homogeneousDifferent hardware, protocols and versions everywhereStandard protocols; tolerate old clients

    Why they bite

    Each fallacy is tempting because it’s nearly true in development. On your laptop, the “network” is localhost: fast, reliable, secure and unchanging. The bugs only appear in production, under load, at the worst moment. The fallacies are really a list of the ways failure sneaks in.

    The frontend is a distributed system too

    A browser talking to an API is two computers on an unreliable network. Real-time UIs make this vivid:

    • A WebSocket will drop. Topology changes every time you deploy, so the client must reconnect with jitter and replay what it missed.
    • A page that fires twenty requests on load is learning fallacy two the hard way.
    • A mobile user in a tunnel is fallacy one and three.

    In practice

    I use the list as a design-review checklist: for each arrow on the diagram, which fallacy does it assume? It’s caught missing timeouts, unbounded retries and a “simple” polling design that would have hammered a backend. When something does go wrong anyway, Observability is how you find out which fallacy it was.

    • #distributed-systems
    • #networking
    • #reliability
    • #system-design

    ↪ Links to (4)