Patterns, without the hype.
Start from a failure or constraint. Add the smallest pattern that addresses it, and know when not to use it.
Idempotency Keys
Make retried commands return one durable outcome.
Outbox Pattern
Commit a domain change and a message-to-publish together.
Saga Pattern
Coordinate a long workflow through compensatable local transactions.
Optimistic Locking
Reject stale writes with a version precondition.
Pessimistic Locking
Serialize a short critical section with database row locks.
Retry with Backoff
Retry transient work without amplifying an outage.
Circuit Breaker
Stop spending resources on a dependency that is persistently failing.
Rate Limiting
Bound resource use and abuse across meaningful identities.
Cache Aside
Read through an application-managed cache while keeping a durable source of truth.
CQRS
Use separate command and read models when their needs truly diverge.
Event Sourcing
Persist domain events as the primary state history.
Webhooks
Deliver signed at-least-once events between independently operated systems.
Distributed Locks
Coordinate across owners only when database constraints or partition ownership cannot.
Pagination
Traverse changing datasets with stable keyset cursors.
Multi-tenancy
Make tenant ownership explicit in identity, schema, authorization, caches, and operations.
Background Jobs
Run durable, retryable work outside an interactive request.
Audit Logs
Record who did what, to which object, when, and why.