Distributed systems
Consensus, replication, time, partitioning and membership.
Consensus
Agreeing on one value or log among replicas.
Raft
Leader-based consensus on a replicated log; one leader per term, majority commit; the default for a strongly consistent replicated state machine.
Multi-Paxos
Paxos run once per log slot with a stable leader that skips phase 1; the foundation of Chubby, Spanner and much production consensus.
bft consensus
Planned.
multi raft
Planned.
viewstamped replication
Planned.
linearizable reads
Planned.
State-machine snapshots
Periodically save the state a log has produced at index i so the log prefix can be deleted; recovery and catch-up become load snapshot plus replay suffix.
nakamoto consensus
Planned.
fork choice rule
Planned.
Replication
Keeping copies in sync.
Chain replication
Replicas in a line: writes enter at the head and commit at the tail, reads hit the tail; f+1 nodes tolerate f failures.
Quorum replication
Leaderless replication: write to W of N replicas, read from R; overlap (R + W > N) makes reads see the latest completed write.
CRDTs
Data types whose replicas accept writes independently and always converge by merging, with no coordination: counters, sets, maps, registers, text.
Primary-backup replication
One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.
Anti-entropy repair
Replicas compare hash trees of a key range, descend only into differing subtrees and stream just those ranges, healing silent divergence in the background.
Hinted handoff
Park a write meant for a down replica as a tagged hint on a healthy node, replay it when the replica returns, and count it toward the write quorum only if availability matters more than consistency.
set reconciliation
Planned.
Time & ordering
Ordering events without a global clock.
Lamport clocks
One integer per process, max-plus-one on receive; gives a total order consistent with causality using 8 bytes per timestamp.
Vector clocks
One counter per node; comparing two vectors tells whether events are ordered or concurrent, which is exactly what conflict detection needs.
Hybrid logical clocks
A 64-bit timestamp that tracks wall-clock time but never goes backwards and respects causality; the default timestamp for MVCC databases without atomic clocks.
Clock synchronization
Estimate a clock's offset from four timestamps, filter out queueing noise, and steer the clock smoothly; NTP gets about a millisecond, PTP with hardware timestamps under a microsecond.
truetime commit wait
Planned.
Distributed ID generation
Mint unique, roughly time-sorted IDs on many nodes with no per-ID coordination: Snowflake (time, worker, sequence) or UUIDv7 (time, random).
Partitioning
Deciding which node owns which key.
Consistent hashing
Hash nodes and keys onto a ring; each key belongs to the next node clockwise, so membership changes move only about 1/n of keys.
Rendezvous hashing
Score every node with hash(key, node) and pick the highest: minimal key movement and exact weights without a ring, at O(n) per lookup.
Jump consistent hash
Five lines, zero memory, near-perfect balance: maps a 64-bit key to one of n numbered buckets, moving only 1/(n+1) of keys when n grows.
Range partitioning
Cut the sorted key space into contiguous half-open ranges kept in a boundary map; split hot or big ranges, merge small ones, move ranges between nodes.
Online resharding
Split or move a shard while it serves traffic by copying a snapshot, replaying changes until the lag is tiny, then flipping a versioned routing table.
crush placement
Planned.
shuffle sharding
Planned.
Scatter-gather query
Send a query only to shards that can match, merge their small partial results, and bound the wait for stragglers.
cell based architecture
Planned.
Membership & failure detection
Knowing who is alive.
SWIM gossip membership
Each node probes one random peer per period, asks k others on timeout, and piggybacks membership updates; constant load per node at any cluster size.
Phi accrual failure detector
Instead of a fixed heartbeat timeout, output a continuous suspicion level φ from the observed heartbeat interval distribution; adapts to each link's jitter.
service discovery
Planned.
Presence tracking
Heartbeats refresh per-connection TTLs; a user is online while any connection lives, with a grace period that hides reconnect flaps.
epidemic broadcast
Planned.
kademlia dht
Planned.
distributed barrier
Planned.
Coordination
Cross-node transactions and ownership.
Two-phase commit
Atomic commit across shards: participants durably vote yes, then the coordinator logs and broadcasts one decision; blocks if the coordinator is lost.
Leases
A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.
Fencing tokens
A number that grows with every lock grant and is checked by the protected resource, so a paused ex-holder's late write is rejected.
conditional writes
Planned.
Saga pattern
Split a cross-service operation into local transactions, each paired with an undo; on failure run the undos in reverse, or retry forward.
Transactional outbox
Write the event as a row in the same local transaction as the state change; a relay publishes it later at-least-once, so state and events never diverge.
percolator transactions
Planned.
causal consistency tokens
Planned.
Config distribution
A control plane pushes versioned resource changes over long-lived streams; each node validates, ACKs or NACKs and keeps its last good copy, so a bad change stops at a canary.
Desired-state reconciliation
Declare the target in a store; controllers repeatedly diff actual against desired from full state and apply idempotent fixes, so missed events only delay convergence.
Watch notifications
A store numbers every write; clients list at revision R, then watch from R+1 and receive an ordered change stream with no gap, no duplicate, and a resume point.
Logs, queues & fan-out
Durable logs and queues, delivery guarantees and fan-out to many consumers.
Partitioned commit log
A topic split into replicated append-only partitions: key hash keeps per-key order, offsets give position, and a high watermark limits readers to fully replicated records.
Segmented log
Split an append-only log into files named by their first offset, write only the newest, and find any record by binary search plus a sparse index.
Consumer offsets
Each consumer group stores one integer per partition, the next position to read, so a restarted consumer resumes where it left off with at-least-once delivery.
consumer group rebalancing
Planned.
log compaction
Planned.
Durable job queue
Persisted tasks that workers lease for a visibility timeout, ack on success and retry with backoff; at-least-once execution that survives worker and queue crashes.
Dead-letter queue
A side queue for messages that keep failing: after N delivery attempts or a permanent error, park them with the reason so the main queue keeps moving.
exactly once processing
Planned.
Event deduplication window
Keep the ids of recently accepted events for a time window and drop repeats; memory stays bounded by rotating time buckets instead of per-entry timers.
Pub/sub fan-out
Deliver one published message to every subscriber of a topic by sharing one encoded payload and giving each connection a bounded queue with an explicit slow-consumer policy.
Fan-out on write
Append each new item id to every follower's precomputed, capped list so a read is one fetch; pull the few huge authors at read time instead.
Message sequence numbers
A per-stream counter on every message lets the receiver detect loss, duplicates and reordering, ack cheaply and resume after reconnect with "send from N".
Stream & batch processing
Windowed streams, shuffles, workflows and recovering lost work.
Windowed stream aggregation
Group events by event-time window per key, keep one partial aggregate per slice, and emit a window when the watermark passes its end.
watermarks
Planned.
stream stream join
Planned.
chandy lamport snapshots
Planned.
data shuffle
Planned.
mapreduce
Planned.
lineage based recovery
Planned.
speculative execution
Planned.
DAG workflow execution
Run a graph of dependent tasks by releasing each one when its inputs are done, longest chain first, and skip any task whose input hashes are unchanged.
Durable workflow execution
Ordinary code made crash-proof by logging every side-effect result and replaying the code from that log; activities run at least once, workflow logic must be deterministic.
batch checkpoint restart
Planned.
Client sync & collaboration
Keeping clients, devices and collaborators in sync over unreliable links.
Incremental sync cursors
The client keeps one opaque token; each pull returns only the changes after it plus the next token, so sync cost scales with what changed, not with the dataset.
Offline mutation queue
Apply actions locally at once and queue them durably; on reconnect replay the queue idempotently, then re-apply unconfirmed ones on the server state.
device shadow state sync
Planned.
Fractional indexing
Give every list item a sortable string key and generate a new key strictly between its neighbours, so a move or insert writes one row.
operational transformation
Planned.
Three-way merge
Merge two descendants against their common ancestor: take whichever side changed, report a conflict only where both changed the same spot differently.
Testing & replay
Reproducing distributed bugs deterministically.
Deterministic simulation testing
Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.
record replay
Planned.
fault injection
Planned.
Open-loop load generation
Send requests on a fixed or random schedule regardless of replies, and time each from its intended send time, so stalls show up in the tail.
HPC communication & scheduling
Message passing and job scheduling on supercomputers.
Halo exchange
Each rank stores its block plus a border copy of its neighbours' edge cells, refreshed by small messages every step; communication scales with block surface, not volume.
eager rendezvous protocol
Planned.
parallel file system striping
Planned.
backfill scheduling
Planned.
gang scheduling
Planned.