Search DistillSys

Find a concept

Type at least two characters to search lessons, designs, papers, and interview prep.

Eight one-page decision guides

Keep the hard parts close.

Print the full set, or keep this page open during design reviews. Each sheet compresses one roadmap stage into the rules, sequence, and failure warning worth remembering.

01
DistillSys field note

Consistency decisions

Start with the invariant, then choose the weakest model that preserves it.

Partition occursPreserve one truth or keep every side responsiveDuring normal operation: consistency or lower latency

Rules of thumb

  • CAP describes partition-time behavior.
  • PACELC adds the normal-time latency trade-off.
  • R + W > N creates overlap, not automatic linearizability.
  • Session guarantees often solve user-facing needs without global coordination.
Open the full lesson →
02
DistillSys field note

Consensus & authority

Consensus establishes one authoritative sequence despite failures and delay.

ElectProposeReplicateMajorityCommitApply

Rules of thumb

  • A majority of N is floor(N/2) + 1.
  • Terms or epochs distinguish current authority from stale leaders.
  • A committed entry survives the failures covered by the quorum.
  • Fencing tokens make former leaders harmless.
Open the full lesson →
03
DistillSys field note

Partitioning & scale

The partition key determines placement, parallelism, locality, and hot spots.

Choose keyMap ownershipRouteMeasure skewSplit or moveFence old owner

Rules of thumb

  • Hashing spreads point traffic but loses ordered locality.
  • Ranges preserve scans but can create leading-edge hot spots.
  • Consistent hashing limits movement when membership changes.
  • Average cluster capacity cannot fix one indivisible hot key.
Open the full lesson →
04
DistillSys field note

Distributed transactions

Choose atomic coordination or an explicit workflow based on the business invariant.

Define invariantChoose commit boundaryHandle ambiguityRetry by identityCompensate or reconcile

Rules of thumb

  • 2PC can block prepared participants while the decision is unknown.
  • A saga commits locally and compensates business effects.
  • MVCC snapshots remove many read/write conflicts, not every anomaly.
  • Idempotency requires one stable operation identity and durable outcome.
Open the full lesson →
05
DistillSys field note

Storage engines

Optimize the amplification dimension your workload can least afford.

WriteWALMemtableFlush SSTableRead across runsCompact

Rules of thumb

  • LSM trees turn random writes into sequential I/O.
  • Bloom filters avoid many absent-key disk reads.
  • Compaction trades background writes for bounded reads and space.
  • Long snapshots delay version garbage collection.
Open the full lesson →
06
DistillSys field note

Messaging semantics

Separate broker delivery from the end-to-end business outcome.

AppendPartitionConsumeApply idempotentlyCommit offsetReplay safely

Rules of thumb

  • Ordering is normally scoped to one partition.
  • At-least-once delivery makes duplicates normal.
  • Parallelism in one consumer group is bounded by partition count.
  • A queue absorbs a burst; it cannot fix sustained overload.
Open the full lesson →
07
DistillSys field note

Failure & overload

Bound work before a struggling dependency turns into a cascading failure.

DeadlineBackoffJitterRetry budgetCircuit breakerLoad shedding

Rules of thumb

  • A timeout is an ambiguous outcome, not proof of failure.
  • Retries consume the same constrained capacity as original traffic.
  • Circuit breakers protect resources; they do not repair dependencies.
  • Reject before expensive work when capacity is no longer safe.
Open the full lesson →
08
DistillSys field note

Multi-region architecture

State write authority, partition behavior, and recovery objectives per operation.

Place replicasRoute trafficAssign authorityReplicateFail overReconcile and fail back

Rules of thumb

  • Synchronous remote durability spends wide-area write latency.
  • Asynchronous replication accepts a nonzero RPO.
  • RTO measures restoration time; RPO measures acceptable data loss.
  • Last-write-wins is a policy for discarding one concurrent intent.
Open the full lesson →