Distributed systems interview questions

CAP and consistency models, replication, quorums, consensus, partitioning, clocks, retries, timeouts, sagas and the outbox pattern.

6 quick facts

– interview-ready · 18 questions in this topic

– of 18 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. What CAP actually saysPick the fix
  2. Consistency models from strong to eventualPick the fix
  3. Leader-follower replication and lagOrder the steps
  4. Quorum reads and writesPredict
  5. Consensus and RaftPredict
  6. Leader election, leases and fencing tokensSpot the bug
  7. Locks in Redis: when they're safePick the fix
  8. Consistent hashingPredict
  1. Sharding: range, hash and directoryPick the fix
  2. Retries with exponential backoff and jitterPredict · timeline
  3. Timeouts and deadline propagationPredict
  4. Circuit breakers and bulkheadsPredict
  5. At-most-once, at-least-once and 'exactly once'Spot the bug
  6. The transactional outbox patternPick the fix
  7. Sagas: orchestration vs choreographyPredict
  8. CQRS and read modelsPick the fix
  9. Clocks, timestamps and ordering eventsPredict
  10. Detecting failures and avoiding split brainPick the fix

Practise this topic

Flashcards · 24

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 18 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 3 sets

Timed, out loud, then tick what you covered. Needs JavaScript.

Fix this PR · 2 reviews

Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.

Sources: Topic outline informed by System Design Primer by Donne Martin and the Zalando RESTful API Guidelines, both licensed under CC BY 4.0. Every question and answer is written by Best Latest Apps. Credits and license