Course map

Topic 125 / Core

Distributed systems fundamentals

Chapter 8.1 · The Nature of Distribution

What and why

A single machine either runs or it doesn't, and whoever is talking to it always finds out which. The moment a system spans more than one machine connected by a network, a third state appears: you don't know — a message can be lost, delayed, or duplicated, and the sender cannot tell a slow reply from no reply at all. A distributed system is a set of independent computers that coordinate by passing messages over a network to appear, to their users, as one coherent system. Builds on: → 10 (client–server architecture — the smallest possible distributed system: two parties, one network between them).

Diagram

Property Single machine Distributed system
Memory one shared address space no shared memory — only messages
Clock one clock every node has its own, never in perfect agreement (→ 135)
Failure all or nothing partial — some nodes/links fail while others work
"Is it down?" a fact you can check locally a guess from a missing reply (→ 126)

How it works

  1. Independent computers — each has its own memory, clock, and failure mode; none can directly read another's memory.
  2. Communication only by message — over a network that can delay, drop, duplicate, or reorder messages, never guaranteed to do none of those things.
  3. No global clock — two nodes' "now" are never exactly the same instant; ordering events across machines needs more than comparing timestamps (→ 134, → 135).
  4. Partial failure — some nodes or links can fail while others keep working; "the system is down" stops being a single fact and becomes "which parts, seen from where."
  5. These four properties are permanent constraints of the medium, not bugs to design away — the rest of Part 8 is the catalogue of techniques for living with them correctly.

Practical example

(illustrative). Incrementing a counter in one process is a single atomic operation: it happened, or it didn't, and the caller knows which. Asking a remote replica to increment the same counter adds a message in each direction; if the reply never arrives, the caller cannot tell whether the increment never happened, happened and the reply was lost, or happened twice because an earlier retry also got through. Nothing about the counter changed — only the fact that a network now sits between the request and the answer.

When to use it

  • Use when: a single machine's capacity or availability genuinely can't meet a measured requirement.
  • Avoid when: a single, well-resourced machine with backups (→ 80) still meets the requirement — every topic in this part adds real operational cost.
  • Failure scenarios: assuming message delivery is reliable, ordered, and exactly-once by default (it's none of those — → 126); treating a slow response as proof of failure, which is indistinguishable from a dead node from the caller's side.
  • Simpler alternative: vertical scaling (→ 90) plus backups, until measurement shows a single machine is insufficient.

Practice

(Vocabulary/process kind — paper exercise; 15–20 min, no lab services). For a described system of 3 application servers behind a load balancer talking to one database, write out 5 distinct ways the network between any two parts could fail without any process crashing, and for each say exactly what a caller would observe (a timeout, a partial response, a duplicate effect, nothing at all). Done when each of the 5 names a concrete, observable symptom rather than "it breaks."

Key takeaway

A distributed system trades one predictable machine for several that can each fail, drift, and be unreachable from each other without warning; every later topic in Part 8 is a technique for living with that honestly. Done when you can: name the four defining properties (independent nodes, message-only communication, no global clock, partial failure) and give one observable symptom of each. Used next in → 126, 127.

References

Kleppmann and Riccomini, Designing Data-Intensive Applications — see references.md.

Source directory

Search the guide