Distributed Systems

Distributed Systems

Raft, consensus, CRDTs, vector clocks, BFT, quorum systems, 2PC.

86Articles
86Topics covered
Articles in this category

All 36 articles, sorted alphabetically

Advertisement
ARTICLE · 01

The CAP Theorem

The CAP Theorem explains why distributed systems cannot guarantee consistency, availability, and partition tolerance simultaneously. Understand the tr…

Read article →
ARTICLE · 02

In Search of a Leader: Understanding Raft Consensus - AICassindra

In the world of distributed systems, getting a cluster of nodes to agree on something—like the order of log entries—is notoriously difficult.

Read article →
ARTICLE · 03

API Gateway Patterns

Kong, Ambassador, AWS API Gateway. Auth (JWT validation), rate limits (per API key), routing (path-based, host-based, weighted), request/response tran…

Read article →
ARTICLE · 04

Bulkhead Pattern

Isolate resources per feature. Prevent noisy neighbor.

Read article →
ARTICLE · 05

Circuit Breaker Pattern

Fail fast when dependency down. Prevent cascade failures.

Read article →
ARTICLE · 06

CRDTs in Production, in depth: choosing data types, syncing with state vectors, storing and compacting history, evolving schemas and securing merges

What it takes to run conflict-free replicated data types in a real product: picking counter, register, set, map and sequence types by their surprising…

Read article →
ARTICLE · 07

Anti-entropy -- healing divergence between replicas

Deep-dive on anti-entropy: the replica-divergence problem, background reconciliation, Merkle trees for efficient difference detection (O(1)/log(n)), r…

Read article →
ARTICLE · 08

Bounded staleness architecture

Deep-dive on bounded-staleness consistency: version-based and time-based bounds, follower applied position and lag, read-path enforcement (serve, wait…

Read article →
ARTICLE · 09

Causal consistency architecture

Deep-dive on causal consistency: the happened-before relation and session guarantees, dependency tracking with vector clocks, hold-until-ready applica…

Read article →
ARTICLE · 10

Chain replication -- strong consistency with simple roles

Deep-dive on chain replication: the chain structure (head to tail), writes propagating down and committing at the tail, reads from the tail (committed…

Read article →
ARTICLE · 11

Raft consensus architecture

Deep-dive on Raft consensus: roles, log replication, commit index, snapshots, joint-consensus membership, and the operational surface.

Read article →
ARTICLE · 12

Raft Consensus, in depth: from the rules in the paper to a production node

Raft as you would implement and operate it: persistent state and fsync ordering, the vote and append handlers as code, why leaders only count replicas…

Read article →
ARTICLE · 13

CRDT replication architecture

Deep-dive on CRDT replication: state-based vs op-based vs delta CRDTs, join-semilattice merges, OR-Sets and PN-counters, version vectors and dots, seq…

Read article →
ARTICLE · 14

Distributed Hash Table Architecture in Depth

DHT architecture in depth: one id space for keys and nodes, virtual nodes, Chord fingers vs Kademlia k-buckets vs Pastry prefixes, join/leave converge…

Read article →
ARTICLE · 15

Fencing tokens -- making distributed locks safe against pauses

Deep-dive on fencing tokens: the paused-lock-holder problem (GC/network/VM pauses past the lease), the monotonic fencing token issued per grant, resou…

Read article →
ARTICLE · 16

Gray failure architecture

Deep-dive on gray failure: the degraded component whose shallow health check passes while real requests suffer, why differential observability is both…

Read article →
ARTICLE · 17

Hinted handoff

Deep-dive on hinted handoff, the Dynamo-style mechanism that preserves write availability when a replica is temporarily down: a live custodian stores …

Read article →
ARTICLE · 18

Hybrid Logical Clocks architecture

Deep-dive on Hybrid Logical Clocks: physical + logical combined, update rule, monotonicity, causality, bounded skew.

Read article →
ARTICLE · 19

Distributed Leader Election Architecture in Depth

A 2500-word walkthrough of leader election in modern distributed systems: heartbeat, election timeout, PreVote, RequestVote, majority, split vote, and…

Read article →
ARTICLE · 20

Leases -- time-bounded exclusive rights

Deep-dive on distributed leases: the safe-exclusive-access need, the time-bounded grant, expiry (auto-release), renewal (by the live holder), contrast…

Read article →
ARTICLE · 21

Merkle tree architecture

Deep-dive on Merkle trees for replica reconciliation: leaf hashes over key ranges, parent hashes up to a single root, root-then-descend comparison, dr…

Read article →
ARTICLE · 22

Operational transformation architecture

Deep-dive on OT for collaborative editing: the operation model, the transformation function and TP1/TP2, the Jupiter central-server model, client pend…

Read article →
ARTICLE · 23

Transactional outbox architecture

Deep-dive on the transactional outbox pattern: how writing the business change and the event to publish in one local database transaction eliminates t…

Read article →
ARTICLE · 24

Paxos

How classical Paxos works: proposers, acceptors, learners, and the two-phase protocol that achieves consensus.

Read article →
ARTICLE · 25

Phi-accrual failure detectors

Deep-dive on phi-accrual failure detection: why fixed timeouts fail, the sampling window and gap-distribution estimator, how phi maps silence to log-s…

Read article →
ARTICLE · 26

Quorum systems

Deep-dive on quorum-based replication: the R+W&amp…

Read article →
ARTICLE · 27

Raft log replication

Deep-dive on Raft log replication: leader-based writes, log entries with term/index/command, AppendEntries replication, majority commit for fault tole…

Read article →
ARTICLE · 28

Read repair and anti-entropy architecture

Deep-dive on the repair mechanisms behind leaderless eventual consistency: read repair on the coordinator&…

Read article →
ARTICLE · 29

Saga Pattern, in depth: compensations, the pivot step, a durable orchestrator and the isolation you give up

How the saga pattern keeps multi-service business transactions consistent without distributed locks: compensatable, pivot and retriable steps, orchest…

Read article →
ARTICLE · 30

Total order broadcast architecture

Deep-dive on total order (atomic) broadcast: the agreement, total-order, validity, and integrity guarantees, equivalence to consensus, leader-sequence…

Read article →
ARTICLE · 31

Vector clock architecture, in depth: causal delivery, consistent cuts and debugging distributed traces

Vector clocks as event-level infrastructure: a clock layer between application and transport, causal broadcast with a hold-back queue, recovering cons…

Read article →
ARTICLE · 32

Vector Clocks in Depth: Tracking Causality, Detecting Concurrent Writes and Keeping the Metadata Bounded

How vector clocks capture happens-before exactly: first principles, the update and comparison rules with Python code, a worked three-process example, …

Read article →
ARTICLE · 33

Replication watermarks architecture

Deep-dive on watermarks in a replicated log: the high-water mark as the committed, safe-to-read boundary computed from the minimum offset replicated t…

Read article →
ARTICLE · 34

ZooKeeper architecture, in depth: znodes, the ensemble, Zab, sessions, watches, consistency guarantees and how to run it

How Apache ZooKeeper works from the inside: the znode data model and node types, leaders, followers and observers, the Zab atomic broadcast and zxids,…

Read article →
ARTICLE · 35

Distributed Transactions in Practice, in depth: choosing between co-location, XA, distributed SQL, sagas and idempotent retries

A practical guide to making changes atomic across machines and services: the decision ladder, how two-phase commit and XA fail in production, how Perc…

Read article →
ARTICLE · 36

Failure Detectors and Phi Accrual, in depth: completeness, accuracy, the detector classes, and building timeout, phi and SWIM detectors that behave in production

How distributed failure detectors really work: why they can only suspect, completeness and accuracy, the Chandra-Toueg classes, detection time and mis…

Read article →