Trade-offs
An index of the trade-offs the How it works articles name. Each page gathers one of them from every mechanism where it appears, and links back to the pages that explain it. It is most useful once you have read one of those mechanisms.
How a page reads
- What it is — the idea on its own, quoted from the mechanisms that state it best.
- Where it appears — each mechanism that makes it: what the mechanism is about, its own sentence on it, and the pages to read.
- Related — the trade-offs made on the same pages most often.
Trade-offs 17
Two things you cannot have together. Every mechanism takes a position on some of them.
Latency vs. throughput
For example: batching, group commit, micro-batch.
10 mechanismsRead-optimized vs. write-optimized
For example: B-tree vs. LSM, merge-on-read vs. copy-on-write.
11 mechanismsSpace vs. time
For example: compression, indexing, materialization, caching.
16 mechanismsConsistency vs. availability vs. latency
For example: quorums, replication modes.
9 mechanismsPrecompute vs. compute-on-read
For example: materialized views, ELT vs. ETL, schema-on-read.
14 mechanismsExactness vs. approximation
For example: sketches, sampling, ANN.
14 mechanismsCoupling vs. coordination cost
For example: 2PC vs. sagas, schema contracts vs. schema-on-read.
16 mechanismsGenerality vs. specialization
For example: general engines vs. purpose-built structures.
10 mechanismsIsolation vs. utilization
For example: multi-tenancy, resource pools, spot capacity.
7 mechanismsSimplicity vs. adaptivity
For example: static plans vs. adaptive execution.
6 mechanismsPush vs. pull
Who initiates the work.
6 mechanismsOrdering vs. parallelism
Global order costs serialization; parallelism costs order.
12 mechanismsDurability vs. acknowledgment latency
How much must be confirmed before you say "yes".
9 mechanismsFail-fast vs. fail-degraded
Reject or continue when something is wrong.
13 mechanismsMutability vs. immutability
In-place update vs. append-only + GC; buys reproducibility and cheap concurrency, pays in space and janitorial work.
14 mechanismsCost as a substitutable resource
Money buys position on every other axis; the only axis denominated in a different unit.
9 mechanismsEarly binding vs. late binding
When structure is committed; determines where the failure surfaces, at write time or read time.
22 mechanisms
Recurring principles 29
Forces that show up mechanism after mechanism, under different names.
Costs are conserved
Costs are conserved, never removed.
26 mechanismsVariance costs more than volume
Variance costs more than volume.
25 mechanismsGranularity mismatch
Granularity mismatch creates amplification.
24 mechanismsIndependence is assumed
Independence is assumed everywhere and is true almost nowhere.
23 mechanismsFixed cost per operation
Fixed cost per operation implies a natural batch size.
20 mechanismsImmutable storage grows indirection
An immutable substrate grows an indirection layer plus a collector.
17 mechanismsThe algebra decides
What can be skipped, pushed down, parallelized, merged or precomputed is determined by the algebra of the function, not the layout of the data.
17 mechanismsAbsence is not evidence
Absence of an event is not absence of a failure.
16 mechanismsWhich way the error points
14 mechanismsDesignate one write
Atomicity over n items is atomicity over one designated item.
13 mechanismsMasking moves failure
Masking a failure moves it from a channel with a schema to a channel without one.
13 mechanismsSound approximations
When exactness is too expensive, use a sound approximation.
13 mechanismsGuarantees have scope
Atomicity is bounded by the shared commit substrate.
11 mechanismsThe end-to-end argument
Guarantees compose to the weakest link, and only endpoint guarantees are real.
11 mechanismsHidden state breaks replay
A replayable pipeline is a pure function of its retained inputs.
9 mechanismsLittle's Law
Concurrency = Throughput × Latency.
9 mechanismsPower laws and skew
8 mechanismsQueues explode near full load
Response time explodes as utilization nears 100%.
8 mechanismsRandomization replaces coordination
Randomization can replace coordination.
8 mechanismsCoordination cannot be made cheaper
Coordination is the only thing you cannot make cheaper.
7 mechanismsFixed capacity meets growth
A fixed-capacity structure meeting growing cardinality breaks the design.
7 mechanismsLocal optimizations compose badly
Identical mechanisms at adjacent layers do not add up. They interfere.
7 mechanismsUndeclared dependencies
An optimization that succeeds becomes an undeclared dependency, with leverage 1/(1 − h).
7 mechanismsRetention is paid by the live path
6 mechanismsBound the answer, bound the state
4 mechanismsThe recovery path is the normal path
The recovery path should be the normal path.
4 mechanismsA cap replaces an estimate
Where a value cannot be predicted, systems substitute a cap.
3 mechanismsOpacity forfeits optimization
Opacity forfeits optimization.
3 mechanismsCoordination scales with parties
Coordination cost scales with the number of parties who must agree, not with the volume of data.
2 mechanisms