Free tech learning for everyone, from basics to pro

Systems Architecture

Distributed Systems

Systems spread across many machines and how they stay consistent.

  • 7 notes
  • 59 minutes of reading

Systems that run on many computers at once

A distributed system is a group of computers that work together and appear to users as one service: a bank's payment platform, a social network or a cloud database. Spreading work across machines brings scale and resilience, but it also brings problems a single computer never has. Messages get delayed or lost, clocks disagree, and parts of the system fail while others keep running.

The key ideas

  • Trade-offs: the CAP theorem says that during a network partition you must choose between consistency and availability; PACELC adds the everyday trade-off between latency and consistency.
  • Consistency models: strong, eventual and causal consistency decide what users see after a change.
  • Replication and sharding: copies of data for resilience, and splitting data so it can grow.
  • Consensus: algorithms such as Raft and Paxos let machines agree even when some fail.
  • Communication: queues, event streams, REST and gRPC connect the parts.

Where to start

Read the notes below in order; each builds on the last. They also explain much of how the cloud services in our cloud architecture notes work behind the scenes.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: