Skip to the guide

What goes wrong in distributed systems

IntermediateConcept3 pages

Once a system runs on more than one machine, part of it can fail while the rest keeps going. Interviewers listen for whether you assume these things will happen, and say what your design does when they do.

Friends planning a surprise party

Five friends in different cities are organising a surprise party by phone. One stops answering: is her phone dead, is she busy, or has she dropped out? Nobody can tell. Their watches disagree by a few minutes, so "I booked it at 6:02" doesn't prove who booked first. And one friend dozes off halfway through the planning, wakes an hour later, and books the venue the group cancelled while she slept.

  • the friends → the servers
  • the friend who stops answering → a partial failure: one part is down, slow or cut off, and the others can't tell which
  • watches that disagree → unreliable clocks
  • the friend who dozed off → a process pause: a program stops for seconds, then carries on with an old view of the world
  • the venue → the storage a write finally lands on
  • nobody can be sure → no node knows the truth on its own; the group decides together