Pattern cards
Reusable failure-shaped tools from the Applied Systems Lab.
- Append-only log Durable ordered history; readers use offsets.
- Approximate counters Trade exactness for write scalability with explicit error bounds.
- Backpressure Slow producers when consumers cannot keep up.
- Consistent hashing Minimize remapping when nodes join/leave.
- Hot-key tactics Detect skew and split, cache, or shed the celebrity key.
- LSM compaction Reclaim and reshape immutable levels so reads stay bounded.
- Leader election Choose one primary for ordering or coordination.
- Lease fencing Time-bounded locks with monotonic tokens that fence zombies.
- Optimistic versioning Compare-and-swap on a version column instead of holding locks.
- Outbox and idempotency Durable intent plus exactly-once *effects* via keys.
- Quorum reads Read from enough replicas to intersect latest write quorum.
- Shard key vs time Key design that avoids hot partitions and unusable scans.
- Signed URLs Capability-bearing links with expiry for direct storage access.
- Single-flight / request coalescing Collapse concurrent identical work into one execution.
- Soft TTL Serve stale briefly while refresh runs.
- Sticky sessions Route a client or room to the same instance while it helps.