Design reference

Pattern index

Use these when they fit, not by default. Each pattern is taught in the topic shown, with when to use it, when not to, and the simpler alternative — this table is an index, not a chapter.

# Area Patterns Taught in
1 Application structure Layered, modular monolith, clean architecture 50, 53, 51
2 API communication API gateway, BFF, asynchronous request–reply 41, 148, 105
3 Data access Repository, unit of work, cache-aside 48, 48, 83
4 Change propagation Transactional outbox, change data capture 118, 119
5 Read performance Index, read replica, CQRS read model 64, 72, 155
6 Messaging Pub/sub, competing consumers, queue-based load leveling, dead-letter queue 109, 108, 110, 117
7 Safe retries Idempotency key, idempotent consumer, deduplication 38, 116, 116
8 Distributed workflows Saga, event sourcing, CQRS 139, 120, 155
9 Resilience Circuit breaker, retry, timeout, bulkhead, graceful degradation 151, 152, 152, 153, 154
10 Traffic control Rate limiting, backpressure, load shedding, admission control 96, 97, 97, 97
11 Data distribution Replication, sharding, consistent hashing 72, 73, 74
12 Integration Anti-corruption layer, sidecar, ambassador 156, 149, 149
13 Application evolution Strangler fig, expand-and-contract 156, 189
14 Security Defense in depth, RBAC, single sign-on, zero trust (a security model) 158, 163, 161, 169
15 Deployment Rolling, blue-green, canary, feature flags 187, 187, 187, 188
16 Production operations Health checks, observability, SLOs 183, 201, 203

The one-line discipline

Before applying any pattern, answer three questions in writing (method step 21):

  1. When to use it — which requirement or failure mode demands it here?
  2. When not to — which of its documented unsuitability conditions apply?
  3. The simpler alternative — what would solve 80% of this for 20% of the complexity, and why is that insufficient?

A pattern that cannot survive question 3 is decoration.

Search the guide