Architecture Patterns

Proven structural solutions to recurring architectural problems. Patterns are not implementations — they’re descriptions of proven approaches with trade-off analysis.


What’s Here


Common Patterns Quick Reference

PatternWhat It SolvesExample
Strangler FigIncremental migration from legacyRoute traffic to new system piece by piece
SidecarAttach utilities to services without modifying themLogging sidecar, metrics exporter
Circuit BreakerPrevent cascading failuresHystrix, Envoy circuit breaker
CQRSSeparate read and write modelsEvent-sourced systems
Event SourcingStore state changes as eventsAudit trails, temporal queries
SagaDistributed transactions without2PCChoreography vs orchestration
BulkheadIsolate failuresSeparate thread pools per dependency
Leader ElectionSingle-writer coordinationetcd, Zookeeper
Write-Ahead LogDurability before acknowledgmentKafka, PostgreSQL WAL

When to Use Patterns

Patterns are starting points, not finished designs. Every pattern introduces trade-offs:

Strangler Fig:
  ✅ Incremental migration, low risk
  ✅ Old and new systems coexist
  ❌ Dual-running complexity
  ❌ Temporary twice the infrastructure cost