stackbook.io
🔍

Pattern Library

Curated architecture patterns with honest trade-offs. Every entry includes when not to use it, failure modes, and cost profile.

Filters

265 of 265 patterns
resilienceestablished · medium burden

Active-Passive Failover

Maintain a standby replica that takes over serving when the active primary fails.

✓ Relational databases with a single writer✓ Singleton services such as schedulers✓ Systems with strict write ordering needs✗ Stateless services better served by active-active✗ When replication lag loss is unacceptable and not mitigated
decision-makingestablished · low burden

Architecture Decision Record (ADR)

Capture a significant architectural decision with its context, alternatives considered, and consequences — creating a searchable, reviewable decision history.

✓ Any decision expensive to reverse (data model, protocol, cloud provider, framework)✓ Decisions affecting multiple teams or services✓ When you'd want to explain 'why' to a new hire in 6 months✗ Tactical coding decisions (variable names, library versions)✗ Decisions already captured in RFCs or design docs
data-consistencyestablished · low burden

Aggregate

Group related entities and value objects into a consistency boundary with a single root that enforces invariants.

✓ Domains with real invariants spanning several objects✓ Systems with concurrent writers needing clear locking scope✓ When modelling with domain-driven design✗ Pure CRUD data with no invariants✗ Reporting or read-heavy models
reliability-opsestablished · medium burden

Alert Fatigue Reduction

Reduce noisy, non-actionable alerts so responders trust the pager and react to the pages that matter.

✓ Teams with high or night-time page volume✓ After incidents that were missed amid noise✓ Consolidating multiple monitoring tools✗ Newly created services with no baseline to judge actionability✗ As justification to delete alerts without analysis
distribution-communicationestablished · medium burden

Ambassador

Place a helper process next to a client that handles outbound network concerns such as retries, routing, monitoring and security on its behalf.

✓ Legacy or third-party clients needing resilience features✓ Uniform outbound policy across languages✓ Offloading connection pooling and sharding logic from clients✗ Inbound traffic concerns, where a gateway fits better✗ Clients already using a well-maintained resilience library
architecture-descriptionestablished · medium burden

Anti-Corruption Layer

Isolate a new model from a legacy or external system by translating between their models at a boundary.

✓ Integrating with a legacy system during migration✓ Consuming a third-party API with a poor or unstable model✓ Two bounded contexts with conflicting vocabularies✗ The external model already matches yours✗ Throwaway integrations with short lifespan
data-consistencyestablished · medium burden

Anti-Entropy with Merkle Trees

Detect and repair divergence between replicas efficiently by comparing hash trees instead of full datasets.

✓ Leaderless replicated stores needing eventual convergence✓ After node outages longer than hint windows✓ Detecting silent data corruption between replicas✗ Small datasets where full comparison is cheap✗ Systems with strongly consistent replication logs
distribution-communicationestablished · medium burden

API Composition

Answer a query spanning several services by calling each and joining the results in memory.

✓ Moderate-sized joins across a few services✓ Queries that are infrequent or latency-tolerant✓ Data must be fresh rather than eventually consistent✗ Large result sets requiring in-memory joins of millions of rows✗ High-traffic queries better served by a read model
economics-evolutionestablished · medium burden

API Deprecation Lifecycle

Retire API versions or endpoints in a predictable, communicated sequence that minimises client breakage.

✓ Public or partner APIs with versioning✓ Breaking changes are unavoidable✓ Need to reduce the number of supported versions✗ Purely internal APIs where all callers can be updated at once✗ Additive non-breaking changes
architecture-descriptionestablished · low burden

API Design Principles

Foundational principles for designing consistent, evolvable, developer-friendly APIs — beyond syntax to architecture.

✓ Any team building APIs✓ Multiple teams, multiple consumers✓ Public or partner APIs✗ Internal RPC (gRPC better)✗ Throwaway prototypes
architecture-descriptionestablished · low burden

API Design (RESTful)

Design consistent, evolvable, developer-friendly REST APIs using standard conventions.

✓ Any team building REST APIs✓ Public or partner APIs✓ Multiple consumers (web, mobile, third-party)✗ Internal RPC (gRPC better)✗ GraphQL APIs (different paradigm)
security-complianceestablished · medium burden

API Gateway Authentication Patterns

Centralize authentication at the API Gateway: JWT validation, API keys, OAuth2 introspection, mTLS — patterns for security and performance.

architecture-descriptionestablished · medium burden

API Gateway Patterns

Common patterns for API Gateway usage: BFF, aggregation, protocol translation, security enforcement.

✓ Multiple client types with different needs✓ Cross-cutting concerns centralized✓ Protocol translation required✗ Single client, simple services✗ Team not ready for gateway ownership
architecture-descriptionestablished · medium burden

API Gateway

Single entry point for clients that handles cross-cutting concerns: routing, auth, rate limiting, observability, protocol translation.

✓ Multiple services exposed to external clients✓ Need centralized auth, rate limiting, observability✓ Protocol translation required✗ Single service (no routing needed)✗ Internal service-to-service (use service mesh)
security-complianceestablished · medium burden

API Key Rotation with Overlap

Replace credentials regularly or on compromise without causing downtime for clients.

✓ Public or partner APIs using keys✓ Internal service credentials in a secret manager✓ Compliance policies mandating periodic rotation✗ Short-lived OAuth tokens already rotate automatically✗ Workload identity removes static keys entirely
architecture-descriptionestablished · medium burden

API Versioning

Evolve APIs without breaking existing clients, using explicit versioning strategy.

✓ Public APIs with external consumers✓ Multiple client teams (mobile, web, partners)✓ Long-lived APIs with evolving requirements✗ Internal APIs with coordinated deploys✗ Single consumer (version in sync)
architecture-descriptionemerging · low burden

Architectural Fitness Functions

Automate objective checks that guard architectural characteristics so they cannot silently erode.

✓ Systems with defined layering or module boundaries✓ Evolving systems where drift is a known risk✓ Non-functional requirements with measurable targets✗ Characteristics that cannot be measured objectively✗ Prototypes with unstable structure
decision-makingestablished · low burden

Architecture Decision Records (ADR)

Capture significant architectural decisions with context, alternatives, and consequences — creating searchable, reviewable decision history.

✓ Any team making architectural decisions✓ Team growing beyond tribal knowledge✓ Regulatory/audit requirements✗ Solo developer (personal notes sufficient)✗ Team with perfect memory and zero turnover
decision-makingestablished · medium burden

Architecture Review Process

Structured architecture review: lightweight, scalable, decision-focused — preventing rubber-stamp approvals and ensuring trade-offs are explicit.

✓ Team > 5 engineers✓ Cross-team dependencies increasing✓ Architecture decisions causing incidents✗ Small team (<5), low complexity✗ Pre-product (velocity > process)
economics-evolutionestablished · medium burden

Architecture Runway

Build just enough technical foundation ahead of feature work so teams can deliver without constant rework.

✓ Multiple teams share a platform or foundation✓ Roadmap requires new technical capability soon✓ Release trains or quarterly planning are in use✗ Single-team products with simple needs✗ No roadmap visibility at all
security-complianceemerging · medium burden

Artifact Signing and Supply-Chain Verification

Prove where a build artifact came from and that it is unmodified, and refuse to deploy anything that cannot be verified.

✓ Container and binary delivery to production✓ Regulated or high-value software✓ Organizations consuming many third-party packages✗ Throwaway prototypes✗ Environments with no enforcement point to verify
distribution-communicationestablished · high burden

Async Communication Patterns

Choose the right async communication pattern: fire-and-forget, request-reply, pub/sub, streaming — trade-offs for coupling, latency, and reliability.

✓ Decouple services (deploy independently)✓ Variable workloads (burst absorption)✓ Multiple consumers for same event✗ Simple request-response (sync HTTP fine)✗ Strong consistency required (distributed tx)
security-complianceestablished · medium burden

Tamper-Evident Audit Logging

Record who did what, when and from where in an append-only, tamper-evident store to support investigation and compliance.

✓ Regulated domains such as finance, health and payments✓ Admin and break-glass actions✓ Multi-tenant products offering customer audit exports✗ Debug tracing, which belongs in observability tooling✗ High-volume data with no accountability need
scalingestablished · medium burden

Autoscaling

Adjust compute capacity automatically in response to load so cost and performance track demand.

✓ Stateless services with variable traffic✓ Queue consumers scaled on backlog per worker✓ Workloads with predictable daily or weekly peaks✗ Stateful systems that need slow, careful rebalancing✗ Constant-load workloads where reserved capacity is cheaper
architecture-descriptionestablished · low burden

AWS Step Functions (Serverless Workflows)

Orchestrate serverless workflows as state machines with built-in retries, error handling, parallel execution, and visual debugging — no servers to manage.

✓ Serverless orchestration (Lambda, ECS, API calls)✓ Long-running processes with retries, human approval✓ Visual debugging and audit trail required✗ Complex logic better in code (Temporal better)✗ Sub-second latency (Express: 5min max)
data-stateestablished · low burden

B-Tree Index

Provide ordered, logarithmic-time lookups and range scans over disk-resident data using a shallow, wide tree of fixed-size pages.

✓ OLTP workloads with point lookups and range queries✓ Columns used in WHERE, JOIN and ORDER BY clauses✓ Read-heavy systems that need predictable latency✗ Extremely write-heavy ingestion where an LSM tree fits better✗ Low-selectivity columns such as a boolean flag
distribution-communicationestablished · medium burden

Backend for Frontend (BFF)

Give each client type its own tailored backend so UI needs do not distort a shared general-purpose API.

✓ Multiple client types with clearly different data needs✓ Frontend teams own their delivery cadence✓ Screens need data from several services per view✗ A single client with a stable API✗ Business rules would leak into the BFF layer
reliability-opsestablished · medium burden

Backfill Strategy

Reprocess historical data safely and efficiently after logic fixes, schema changes or outages.

✓ Bug fix changes historical results✓ New field or metric needs history✓ Recovery after a source or pipeline outage✗ Only future data is affected✗ Job is non-deterministic or has uncontrolled side effects
resilienceestablished · low burden

Backpressure

Signal upstream to slow down when downstream cannot keep up, preventing buffer overflow and cascade failure.

✓ Streaming data: logs, metrics, events, file uploads✓ Async pipelines with variable throughput✓ Reactive systems (Project Reactor, RxJava, Akka Streams)✗ Request-response (synchronous, natural backpressure)✗ Low throughput where buffering is fine
scalingestablished · low burden

Batching

Group many small operations into fewer larger ones to amortize per-call overhead.

✓ High-volume writes such as logs, events and metrics✓ Fan-in of many small reads to one backend (multi-get, DataLoader)✓ Throughput-bound pipelines where per-item latency is relaxed✗ Interactive operations where every millisecond counts✗ Items that must be committed or ordered individually
reliability-opsestablished · medium burden

Blameless Postmortem

Learn from incidents by examining systemic causes and producing tracked follow-up actions without assigning personal fault.

✓ Incidents above a severity or error budget threshold✓ Near misses with high potential impact✓ Building a learning culture in engineering✗ Minor blips already covered by an existing known issue✗ Cases of deliberate malicious or negligent conduct, which follow HR or security processes
data-stateestablished · low burden

Bloom Filter

Cheaply answer whether an item is definitely absent or possibly present, avoiding expensive lookups for misses.

✓ Skipping SSTables or partitions that cannot contain a key✓ Cache-penetration protection for nonexistent keys✓ Deduplication checks over very large key sets✗ Cases where a false positive is unacceptable and not rechecked✗ Sets needing deletion without a counting or cuckoo variant
deploymentestablished · medium burden

Blue-Green Deployment

Run two identical environments (blue, green). Switch traffic atomically for zero-downtime deployments with instant rollback.

✓ Zero-downtime requirement✓ Instant rollback critical✓ Infrastructure supports duplicate envs (K8s namespaces, ASGs)✗ Stateful services without session handling✗ Breaking schema changes (need expand/contract)
architecture-descriptionestablished · low burden

Bounded Context

Define an explicit boundary within which a domain model and its language are consistent and unambiguous.

✓ Large domains with multiple teams and subdomains✓ When terminology conflicts appear between departments✓ Before decomposing a monolith into services✗ Small applications with one team and one vocabulary✗ Early exploration where the domain is unclear
decision-makingestablished · low burden

Build vs Buy Decision

Decide systematically whether to build a capability in-house, buy a product, or adopt open source.

✓ Starting a new capability with credible vendor options✓ Renewing a large contract or reviewing homegrown tooling✓ Choosing between managed service and self-hosting✗ The capability is clearly the product itself✗ Regulation mandates a specific approach
distribution-communicationestablished · medium burden

Bulk and Batch APIs

Let clients submit or fetch many items in a single request to cut round trips and per-call overhead.

✓ Importing, syncing or updating many records✓ Fetching many resources by id✓ Clients on high-latency networks✗ Single-item interactive operations✗ Operations needing strict per-item ordering with rollback complexity
resilienceestablished · low burden

Bulkhead Pattern

Isolate components of a system so that failure in one does not cascadingly fail the entire application, analogous to ship bulkheads preventing water from flooding the entire vessel.

✓ Any service with multiple downstream dependencies✓ Preventing cascading failures in distributed systems✓ When some dependencies are more critical than others✗ Very small services with a single dependency✗ When all dependencies have similar criticality and failure modes
observabilityestablished · medium burden

Burn-Rate Alerting

Alert on how fast the error budget is being consumed, using multiple windows to balance detection speed against false pages.

✓ Services with SLOs and a rotating on-call✓ Replacing noisy static threshold alerts✓ Detecting both sudden outages and slow degradation✗ Services with very low traffic, where one error is a huge ratio✗ Systems without a defined SLO
architecture-descriptionestablished · low burden

C4 Model

A hierarchical notation for describing software architecture at four levels of abstraction, optimising for different audiences and decision contexts.

✓ Any architecture documentation that needs to be maintained✓ Design reviews where stakeholders have varied technical depth✓ Onboarding new team members to system structure✗ Throwaway prototypes or spike investigations✗ Infrastructure-only diagrams (use cloud provider notation)
scalingestablished · low burden

Cache-Aside

Let the application load data into a cache on demand, reading the cache first and the database on a miss.

✓ Read-heavy data with a hot subset such as profiles or product pages✓ When the cache may be unavailable and reads must fall back to the database✓ When different consumers need different cached shapes of the same data✗ Write-heavy data that changes faster than it is read✗ Data needing read-your-writes consistency across all nodes without extra care
scalingestablished · low burden

Cache Stampede Protection

Prevent many concurrent requests from regenerating the same expired cache entry at once.

✓ Keys with high read rates and expensive regeneration✓ Aggregates, leaderboards and rendered pages✓ After deploys or restarts that clear the cache✗ Cheap lookups where the database absorbs the burst easily✗ Rarely read keys that never see concurrent misses
scalingestablished · low burden

Caching

Store frequently accessed computed or fetched data in fast storage to reduce latency and downstream load.

✓ Hot data: config, reference data, computed aggregates✓ Expensive computations: recommendations, ML inference✓ Downstream protection: reduce DB/third-party load✗ Write-heavy, low-read data✗ Strong consistency required (financial balances)
reliability-opsestablished · medium burden

Canary Analysis

Automatically compare metrics of a canary release against a baseline to decide whether to promote or roll back.

✓ Frequent releases to services with solid telemetry✓ Teams automating promotion in a delivery pipeline✓ Services where regressions are subtle, such as latency tails✗ Low traffic where samples are too small for statistics✗ No trustworthy metrics or alerting baseline
deploymentestablished · medium burden

Canary Deployment

Gradually shift traffic to new version, monitoring for regressions before full rollout.

✓ Continuous deployment pipeline✓ Risky changes: schema, algorithm, third-party upgrade✓ User-facing services with measurable metrics✗ Infrastructure changes (no traffic to split)✗ Single-instance services (no parallel versions)
data-consistencyestablished · low burden

CAP Theorem

Reason about the unavoidable choice between consistency and availability when a network partition occurs in a replicated system.

✓ Choosing or configuring replicated datastores✓ Designing multi-region write paths✓ Explaining failure behavior to stakeholders✗ Single-node systems with no replication✗ Reasoning about normal-case latency (use PACELC)
economics-evolutionestablished · medium burden

Capacity Planning

Predict resource needs (CPU, memory, storage, network) for future load, enabling proactive scaling and cost optimization.

✓ Growing systems (user base, data, features)✓ Cost optimization initiatives✓ Preparing for known events (Black Friday, launch)✗ Stable, predictable workloads✗ Serverless (capacity managed by provider)
data-consistencyestablished · high burden

Change Data Capture (CDC)

Capture database changes (insert/update/delete) in real-time and stream them to downstream systems.

✓ Real-time analytics, search indexing, cache invalidation✓ Event sourcing / CQRS projection updates✓ Audit logging, compliance✗ Low change volume (polling simpler)✗ Database doesn't support logical replication
scalingestablished · medium burden

CDN Edge Caching

Serve cacheable responses from points of presence near users to cut latency and offload the origin.

✓ Static assets, images, video segments and downloads✓ Public API or HTML responses that tolerate seconds to minutes of staleness✓ Global audiences far from a single origin region✗ Per-user private responses without careful cache-key design✗ Data that must be strongly consistent on every read
architecture-descriptionemerging · high burden

Cell-Based Architecture Patterns

Partition system into independent cells (tenants, regions, shards) so failure in one cell doesn't affect others, enabling safe deployments and blast radius control.

✓ High availability requirements (99.99%+)✓ Regulatory data residency✓ Large-scale SaaS (1000+ tenants)✗ Small systems (<10 cells)✗ Strong cross-tenant consistency needed
architecture-descriptionemerging · high burden

Cell-Based Architecture

Partition system into independent cells (tenants, regions, shards) so failure in one cell doesn't affect others.

✓ High availability requirements (99.99%+)✓ Regulatory data residency✓ Large-scale SaaS (1000+ tenants)✗ Small systems (<10 cells)✗ Strong cross-tenant consistency needed
data-consistencyestablished · medium burden

Change Data Capture Pipeline

Stream committed database changes from the transaction log into analytics stores with low latency and low source impact.

✓ Near-real-time replication of operational data to analytics✓ Need to capture deletes and every intermediate update✓ Cannot add load of heavy extract queries to the source✗ Daily snapshot is sufficient and sources are small✗ Source database cannot expose its log
reliability-opsemerging · high burden

Chaos Engineering

Proactively inject failures to discover weaknesses before they cause outages, building confidence in system resilience.

✓ High availability targets (99.99%+)✓ Post-incident: prevent recurrence✓ Before major launches or migrations✗ No observability (blind injection)✗ No rollback/autostop mechanism
resilienceestablished · low burden

Circuit Breaker

Prevent cascading failures by stopping requests to a failing service, giving it time to recover.

✓ Any synchronous remote call (HTTP, gRPC, DB)✓ Downstream services with variable latency or reliability✓ When caller must remain responsive during downstream outage✗ Local in-process calls (no network failure mode)✗ Fire-and-forget async operations
messagingestablished · medium burden

Claim Check

Keep messages small by storing large payloads in external storage and sending only a reference through the broker.

✓ Payloads such as images, documents or batches exceed broker limits✓ Many subscribers need only metadata✓ Payload retention differs from message retention✗ Messages are already small✗ Strict atomic delivery of data and notification is needed without a second system
architecture-descriptionestablished · low burden

Clean Architecture

Organize code in concentric layers where source dependencies only point inward toward business rules.

✓ Complex domains with long expected lifespan✓ Systems that must support several delivery mechanisms✓ Organizations standardizing structure across many services✗ Small CRUD services✗ Throwaway prototypes
data-stateestablished · medium burden

Columnar Storage

Store each column contiguously so analytical queries read and compress only the columns they need.

✓ Data warehouses and BI dashboards✓ Wide tables where queries select a handful of columns✓ Large scans with aggregations and filters✗ OLTP workloads with frequent single-row updates✗ Point lookups returning entire rows
resilienceestablished · high burden

Compensating Actions

Undo the effects of completed steps in a multi-step process by running explicit inverse operations when a later step fails.

✓ Sagas across microservices✓ Order, booking, and payment workflows✓ Long-running business transactions✗ Single database where a real transaction works✗ Irreversible effects with no acceptable correction
messagingestablished · medium burden

Competing Consumers

Scale message processing by letting multiple consumers pull from the same queue so each message is handled by exactly one of them.

✓ Work items are independent and order is unimportant✓ Load is spiky and workers should scale with backlog✓ Tasks are long enough that parallelism pays off✗ Messages for the same entity must be processed in order✗ Handlers are not idempotent and redelivery is unsafe
data-consistencyestablished · medium burden

Conflict Resolution

Deterministically reconcile concurrent updates to the same data accepted by different replicas or clients.

✓ Multi-leader or leaderless replication✓ Offline-first and collaborative applications✓ Cross-region active-active writes✗ Single-writer designs where conflicts cannot occur✗ Data protected by strong consistency or locks
scalingestablished · low burden

Connection Pooling

Reuse a bounded set of long-lived database connections across many requests to avoid connection setup cost and server overload.

✓ Any service issuing frequent short database queries✓ Serverless or highly replicated apps that could exceed connection limits✓ Databases with costly per-connection resources✗ Single long-running batch jobs with one connection✗ Workloads relying on session state that a transaction-mode pooler would break
decision-makingestablished · medium burden

Consistency Model Selection

Choose the weakest consistency guarantee that still protects each business invariant, per dataset and per operation.

✓ Selecting a database or tuning its consistency settings✓ Designing multi-region or replicated architectures✓ Resolving disputes between product and engineering about staleness✗ Single-node ACID databases where one model applies✗ When the datastore offers only one fixed guarantee
data-consistencyestablished · low burden

Consistency Model

Define the contract between a replicated data store and its clients about which values reads may return and in what order.

✓ Evaluating or documenting a datastore✓ Designing client logic over replicated data✓ Diagnosing anomalies such as stale or time-travelling reads✗ Single-node databases with serializable transactions and no replicas✗ Quick prototypes where anomalies are harmless
scalingestablished · low burden

Consistent Hashing

Distribute keys across nodes with minimal reshuffling when nodes join/leave, using a hash ring with virtual nodes.

✓ Dynamic node membership (add/remove nodes)✓ Distributed cache or sharding✓ Minimal reshuffle on scaling✗ Static cluster (simple hash % N fine)✗ Small N (<5) where distribution skew matters
architecture-descriptionestablished · low burden

Constraint Documentation

Make the fixed boundaries and assumptions around a system explicit so design options are evaluated against reality.

✓ Kickoff of a new system or migration✓ Regulated or contract-bound environments✓ Before comparing architecture options✗ Very small changes inside an established design✗ When nobody owns keeping the register current
architecture-descriptionestablished · medium burden

Consumer-Driven Contracts (CDC)

Ensure provider changes don't break consumers by making consumers define their expectations as executable contracts.

✓ Microservices with independent deployments✓ Multiple consumers per provider✓ Breaking changes cause production incidents✗ Monolith or few services with coordinated deploys✗ Public APIs with unknown consumers
messagingestablished · high burden

Consumer Groups and Partitioning

Scale stream consumption while preserving per-key order by splitting a topic into partitions and assigning each partition to one consumer in a group.

✓ High-volume streams needing per-key ordering✓ Several independent applications consume the same events✓ Replay from stored offsets is needed✗ Low volume where one queue suffices✗ Per-message priority or delayed delivery is needed
architecture-descriptionestablished · low burden

Context Mapping

Document and choose the relationships between bounded contexts so that integration and team dependencies are explicit.

✓ Multiple bounded contexts or teams must integrate✓ Planning a monolith decomposition✓ Diagnosing recurring cross-team integration pain✗ A single context with one team✗ As a one-time diagram never revisited
coordinationestablished · medium burden

Conway's Law and Inverse Conway Maneuver

Shape team structure deliberately so that the resulting system architecture matches the desired design.

✓ Splitting a monolith into services✓ Frequent cross-team coordination slows features✓ Planning a reorganization alongside a re-architecture✗ A very small team with a single codebase✗ Organization changes are impossible in the near term
observabilityestablished · low burden

Correlation IDs

Attach a unique identifier to each request and propagate it through every hop so related logs and events can be joined.

✓ Microservice or event-driven systems✓ Support workflows where users report an error✓ Joining logs across services during incidents✗ Single process applications with a request-scoped logger✗ Storing it as a replacement for authenticated user identity
economics-evolutionemerging · high burden

Cloud Cost Optimization

Continuously reduce cloud spend while maintaining performance and reliability, using unit economics and architectural choices.

✓ Cloud spend > $10k/month✓ Finance asking for cost accountability✓ Architectural decisions need cost input✗ Pre-revenue (optimize for velocity)✗ Tiny spend (<$1k/month)
data-stateestablished · low burden

Covering and Partial Indexes

Shape indexes so common queries are answered from the index alone and indexes stay small by covering only relevant rows.

✓ Hot read queries returning a few columns✓ Tables where queries target a small subset, such as pending or active rows✓ Read-heavy systems with spare write capacity✗ Write-heavy tables where each extra index hurts✗ Rarely executed queries
architecture-descriptionestablished · high burden

CQRS (Command Query Responsibility Segregation) Patterns

Separate read and write models to optimize each: writes for consistency, reads for query performance and flexibility.

✓ Read/write patterns differ significantly✓ Complex queries on normalized data✓ Different scaling needs (read replicas vs write primary)✗ Simple CRUD with straightforward queries✗ Strong consistency required between read/write
architecture-descriptionestablished · high burden

CQRS (Command Query Responsibility Segregation)

Separate read and write models to optimize each for its specific concerns: writes for consistency, reads for query performance.

✓ Read/write patterns differ significantly✓ Complex queries on normalized data✓ Different scaling needs (read replicas vs write primary)✗ Simple CRUD with straightforward queries✗ Strong consistency required between read/write
data-consistencyestablished · medium burden

CRDTs

Let replicas update data independently and merge automatically to the same state without coordination.

✓ Collaborative editing and offline-first apps✓ Counters, sets and presence data replicated across regions✓ Active-active databases needing automatic conflict resolution✗ Invariants needing coordination such as unique usernames or non-negative balances✗ Simple single-writer data
coordinationemerging · medium burden

Data Contracts

Define an explicit, enforced agreement between data producers and consumers on schema, semantics and quality.

✓ Many downstream consumers of operational events or tables✓ Recurring incidents from upstream schema changes✓ Data used for ML or financial reporting needs stability✗ Exploratory data with a single owner and consumer✗ Producers cannot commit to ownership
observabilityemerging · medium burden

Data Lineage

Record how data flows and transforms from sources to outputs to enable impact analysis, debugging and compliance.

✓ Many pipelines and teams with unclear dependencies✓ Compliance requires tracing sensitive data✓ Frequent incidents needing root-cause across jobs✗ A handful of pipelines documented in one repo✗ No ability to instrument the tools in use
architecture-descriptionemerging · high burden

Data Mesh

Decentralize analytical data ownership to domain teams that publish data as products on a shared self-serve platform.

✓ Large organization with many domains and central team bottleneck✓ Domains have engineering capacity to own data✓ Strong need for cross-domain reuse of data✗ Small company with a handful of data users✗ Domains lack data engineering skill
data-stateestablished · medium burden

Data Modeling Patterns

Design scalable, maintainable data models: normalization, denormalization, entity relationships, temporal data, polymorphic associations.

✓ Any system with relational data✓ Schema evolution without downtime✓ Query performance optimization✗ Document/NoSQL primary (different patterns)✗ Team not ready for modeling discipline
security-complianceestablished · high burden

Data Residency and Regional Isolation

Keep regulated data stored and processed within a required jurisdiction while still offering a unified product.

✓ Serving EU, UK, or other regulated markets✓ Enterprise customers contractually requiring regions✓ Healthcare or government workloads✗ No regulatory or contractual locality needs✗ Very early stage with one market
data-stateestablished · medium burden

Database Indexing Strategy

Design indexes that accelerate queries without killing write performance, using covering indexes, partial indexes, and query-driven design.

✓ Any production database with query performance needs✓ Write-heavy tables (index carefully)✓ Query patterns changing✗ Tiny tables (seq scan faster)✗ Append-only logs (few queries)
data-consistencyestablished · high burden

Database Migration (Expand/Contract)

Evolve database schema without downtime or locking, using backward-compatible multi-phase migrations.

✓ Any schema change on tables with >1M rows✓ Zero-downtime deployments required✓ Blue-green or canary deployments✗ Small tables, maintenance window acceptable✗ Breaking changes that can't be phased (rare)
data-stateestablished · high burden

Database per Service

Give each microservice exclusive ownership of its data so services can evolve and scale independently.

✓ Microservice architectures with independent teams and release cycles✓ Services with distinct scaling or storage requirements✓ Domains with clear bounded contexts✗ Small teams and modular monoliths where one database is simpler✗ Domains requiring frequent strong-consistency joins across entities
resilienceestablished · medium burden

Dead Letter Queue (DLQ)

Capture messages that fail processing repeatedly for later inspection and replay, preventing pipeline blockage.

✓ Any async message processing system✓ Message failures are expected (bad data, transient bugs)✓ Need visibility into failure patterns✗ Synchronous request-response (no queue)✗ Fire-and-forget where loss is acceptable
resilienceestablished · low burden

Deadline Propagation

Pass an absolute request deadline through every hop so downstream services stop work the caller can no longer use.

✓ Deep microservice call chains✓ Services under load where abandoned work piles up✓ gRPC or context-based RPC frameworks✗ Fire-and-forget asynchronous jobs✗ Single-service applications
security-complianceestablished · high burden

Defense in Depth

Layer independent security controls so that the failure of any single control does not lead to compromise.

✓ Any system handling sensitive data✓ Internet-facing services✓ Environments with multiple teams and third-party code✗ Never skip entirely, but avoid stacking redundant identical controls✗ Throwaway sandboxes with no real data
deploymentestablished · high burden

Deployment Strategies

Choose and implement safe deployment strategies: rolling, blue-green, canary, feature flags — with automated rollback and observability.

✓ Any production deployment✓ Zero-downtime requirements✓ Risk mitigation for changes✗ Dev/test environments (rolling fine)✗ Single-instance services (no HA)
decision-makingestablished · low burden

Design Record

Capture a significant design as a durable, reviewable document that records context, options, decision, and consequences.

✓ A choice is expensive to reverse (datastore, protocol, tenancy model)✓ Several teams are affected by the outcome✓ You expect staff turnover or long-lived systems✗ Trivial, easily reversible choices✗ Pure exploration where the answer is not yet known
reliability-opsestablished · high burden

Disaster Recovery (DR)

Define and practice recovery from catastrophic failures: region loss, data corruption, ransomware, ensuring RTO/RPO targets are met.

✓ Any production system with availability requirements✓ Regulatory: DR mandated (finance, healthcare, gov)✓ Customer contracts specify RTO/RPO✗ Dev/test environments✗ Systems where data loss/downtime acceptable
coordinationestablished · low burden

Distributed Lock

Coordinate access to shared resource across distributed processes, ensuring mutual exclusion with fault tolerance.

✓ Singleton task across multiple instances✓ Leader election for HA services✓ Coordination without message broker✗ High-contention hot paths (use partitioning)✗ Long-held locks (minutes+) — prefer leases
observabilityestablished · medium burden

Distributed Tracing

Track request flow across service boundaries to understand latency, errors, and dependencies.

✓ Any distributed system (>3 services)✓ Latency debugging across service boundaries✓ Error root cause analysis✗ Monolith or 2-service system (logs sufficient)✗ Ultra-high throughput where sampling loses signal
data-consistencyestablished · high burden

Distributed Transactions Patterns

Coordinate atomic operations across services without distributed locks: 2PC, Saga, Outbox, Eventual Consistency — trade-offs and implementation.

✓ Microservices needing cross-service atomicity✓ Long-running business processes✓ Event-driven architectures✗ Simple CRUD (single service)✗ Strong consistency required everywhere (monolith)
messagingestablished · medium burden

Domain Event

Capture something meaningful that happened in the domain as an immutable fact that other parts of the system can react to.

✓ Domain logic triggers independent side effects✓ Decoupling aggregates or bounded contexts✓ Building audit trails or event-driven integrations✗ Simple flows where a direct call is clearer✗ When strict immediate consistency across handlers is required
messagingestablished · medium burden

Dual Writes Problem

Avoid inconsistency caused by updating a database and publishing a message as two separate, non-atomic steps.

✓ Recognize it during design reviews of any save-then-publish code✓ State must be reflected in both a database and a broker or cache✓ Search index or cache updates follow database writes✗ A single datastore handles both state and events✗ Losing occasional updates is acceptable and repaired by periodic sync
scalingestablished · medium burden

Edge Computing

Run computation and caching close to users or devices to cut latency and offload origin systems.

✓ Latency-sensitive global traffic✓ Cacheable or lightly personalized responses✓ Filtering or aggregating device data before upload✗ Logic needs strongly consistent central state✗ Heavy compute exceeding edge runtime limits
security-complianceestablished · low burden

Request Validation at the Edge

Reject malformed or abusive requests at the gateway before they reach backend services.

✓ Public APIs exposed to untrusted clients✓ Many services needing consistent baseline validation✓ Protecting backends from oversized or malformed traffic✗ Complex business-rule validation✗ Only a single internal service with no gateway
security-complianceestablished · medium burden

Envelope Encryption

Encrypt large data with local data keys and protect those keys with a master key held in a KMS or HSM.

✓ Encrypting objects, files or database fields at rest✓ Multi-tenant systems needing per-tenant keys✓ Compliance requiring customer-managed keys✗ Small secrets better stored in a secret manager✗ Storage already encrypted transparently with adequate controls
deploymentestablished · medium burden

Ephemeral Environments

Create a full, isolated environment on demand for each change and destroy it automatically when the change is finished.

✓ Many teams or branches contending for staging✓ UI changes needing designer and product review✓ Integration and end-to-end testing per change✗ Systems depending on hardware or licensed software that cannot be cloned✗ Environments requiring huge datasets that cannot be seeded quickly
reliability-opsestablished · medium burden

Error Budget Policy

Convert an SLO into a spendable budget of allowed failure and tie it to explicit decisions about feature work and reliability work.

✓ Services with a defined SLO and an active release cadence✓ Resolving velocity-versus-stability disputes✓ Prioritizing reliability backlog items✗ Services with no reliable SLI measurement✗ Safety-critical systems where any failure is unacceptable
data-stateestablished · medium burden

ETL vs ELT

Choose whether to transform data before loading into the target or inside the target after loading.

✓ Cloud warehouse with scalable compute (ELT)✓ Compliance requires removing fields before landing (ETL)✓ Analysts own transformations in SQL (ELT)✗ Tiny datasets where either adds needless tooling✗ Transformations need non-SQL logic like ML models inline with ELT only
messagingestablished · medium burden

Event-Carried State Transfer

Include enough entity state in each event that consumers can maintain a local copy and avoid calling the source service.

✓ Consumers need reference data such as customers or products often✓ Source service availability must not affect consumers✓ Read-heavy workloads can tolerate eventual consistency✗ Consumers need strongly consistent, current data✗ Data is highly sensitive and should not be copied
architecture-descriptionestablished · high burden

Event-Driven Architecture (EDA)

Decouple services through asynchronous event communication, enabling independent scaling, deployment, and evolution.

✓ Microservices needing loose coupling✓ Audit trail, replay, temporal queries✓ Polyglot services (different languages)✗ Simple request-response (REST/gRPC fine)✗ Strong consistency required (distributed transactions)
messagingestablished · medium burden

Event Schema Registry

Centralize and version event schemas, enforcing compatibility rules so producers and consumers can evolve independently.

✓ Multiple teams produce and consume shared topics✓ Events are retained and replayed over long periods✓ Binary formats like Avro or Protobuf are used✗ A single team owns both ends and deploys together✗ Messages are short-lived and untyped by design
data-consistencyestablished · high burden

Event Sourcing Patterns

Persist state changes as immutable event log, enabling audit trail, temporal queries, replay, and multiple read models.

✓ Audit/regulatory requirements (financial, healthcare, gov)✓ Complex domain with rich business events✓ Need temporal queries (state at date X)✗ Simple CRUD with no audit needs✗ High-throughput, low-latency writes (event store adds overhead)
data-consistencyestablished · high burden

Event Sourcing

Persist state changes as an immutable sequence of events, enabling complete audit trail, temporal queries, and rebuild of state.

✓ Audit/regulatory requirements (financial, healthcare, gov)✓ Complex domain with rich business events✓ Need temporal queries (state at date X)✗ Simple CRUD with no audit needs✗ High-throughput, low-latency writes (event store adds overhead)
data-consistencyestablished · medium burden

Eventual Consistency

Accept temporary divergence between replicas in exchange for availability and low latency, guaranteeing convergence once updates stop.

✓ Global, high-availability read-heavy workloads✓ Caches, feeds, counters, and search indexes✓ Cross-service data propagation through events✗ Invariants such as balances or uniqueness that require immediate agreement✗ Check-then-act logic across replicas
economics-evolutionemerging · medium burden

Evolutionary Architecture

Design systems to support guided, incremental change across multiple dimensions as requirements evolve.

✓ Domains with uncertain or shifting requirements✓ Long-lived systems expected to outlive current technology✓ Teams with continuous delivery capability✗ Safety-critical systems with fixed specifications✗ Teams lacking automated testing and deployment
messagingestablished · medium burden

Exactly-Once Illusion

Achieve exactly-once effects by combining at-least-once delivery with idempotent processing, because exactly-once delivery itself is not possible over unreliable networks.

✓ Payments, orders, and any non-repeatable side effect✓ Message consumers with retries or redelivery✓ APIs where clients retry on timeout✗ Purely idempotent or read-only operations✗ Best-effort telemetry where loss or duplication is harmless
messagingestablished · medium burden

Exactly-Once Processing

Achieve the observable effect of processing each message exactly once on top of at-least-once delivery.

✓ Money, inventory or other non-repeatable effects✓ Consumers read and write within one transactional store✓ Upstream retries are unavoidable✗ Effects are naturally idempotent, such as setting a value✗ Approximate counts are acceptable
observabilityestablished · medium burden

Exemplars and Trace-Metric Linking

Attach sample trace identifiers to metric data points so an engineer can jump from a latency spike straight to a representative slow trace.

✓ Services with both histograms and distributed tracing✓ Investigating tail latency or error spikes✓ Teams that want a metrics-first debugging workflow✗ Systems without tracing✗ Metrics that are not histograms or counters with request context
data-consistencyestablished · medium burden

Expand-Contract Migration

Change a schema or interface in compatible phases so old and new application versions work against it simultaneously, enabling zero-downtime releases.

✓ Zero-downtime schema changes in relational databases✓ Public API or event schema evolution with external consumers✓ Any rolling or canary deploy touching shared state✗ Throwaway or single-user systems where downtime is fine✗ Brand-new tables with no existing readers
messagingestablished · medium burden

Fan-Out Fan-In

Split a task into parallel subtasks distributed across workers, then collect and combine their results.

✓ Work divides into independent chunks✓ Latency matters and workers can run concurrently✓ Results can be merged by a commutative or well-defined reduction✗ Subtasks depend on each other sequentially✗ Splitting overhead exceeds the work itself
scalingestablished · medium burden

Fan-out on Write

Push new content into each follower feed at write time so reads are cheap.

✓ Social timelines, notification inboxes and activity feeds✓ Read-heavy systems with moderate follower counts✓ Products where feed latency is a key metric✗ Accounts with huge audiences, unless using a hybrid model✗ Write-heavy systems with rarely opened feeds
deploymentestablished · medium burden

Feature Flag Best Practices

Operational patterns for feature flags: naming, lifecycle, cleanup, testing, avoiding flag debt.

✓ Continuous deployment with feature flags✓ Team has >20 flags✓ Flag debt causing bugs✗ No feature flags (simple deploys)✗ Team not ready for hygiene process
deploymentestablished · low burden

Feature Flag (Feature Toggle)

Decouple deployment from release. Enable/disable features at runtime without code deploy.

✓ Continuous deployment (deploy ≠ release)✓ A/B testing, gradual rollout✓ Kill switches for risky dependencies✗ Simple deployments (no branching needed)✗ Flags that live forever (tech debt)
data-stateemerging · high burden

Feature Store

Centralize definition, computation and serving of machine learning features for consistent training and inference.

✓ Multiple models share features✓ Online inference needs low-latency feature lookups✓ Training-serving skew has caused incidents✗ One model with simple, request-derived inputs✗ No online serving requirement
coordinationestablished · low burden

Fencing Tokens

Prevent a stale lock holder or old leader from corrupting shared resources by attaching monotonically increasing tokens to its requests.

✓ Distributed locks protecting storage or external side effects✓ Leader election where old leaders may linger✓ Any lease-based exclusion where correctness matters✗ Efficiency-only locks where occasional duplication is harmless✗ Resources that cannot check or store a token
economics-evolutionestablished · medium burden

FinOps Cost Allocation and Tagging

Attribute cloud spend to teams, products, and environments so cost becomes an engineering signal.

✓ Cloud spend is large enough to require accountability✓ Multiple teams share accounts or clusters✓ Leadership asks for cost per product or customer✗ Spend is trivial relative to attribution effort✗ Single team owns everything
reliability-opsestablished · medium burden

Game Days

Rehearse failures in a planned, observed exercise to validate systems, runbooks, and team response before a real incident.

✓ Before launching or after major architecture changes✓ Validating failover, backups, and runbooks✓ Training new on-call engineers✗ Systems with no monitoring, since results cannot be observed✗ During freezes, peak events, or active incidents
deploymentestablished · medium burden

GitOps

Make a Git repository the single source of truth for desired system state, with an agent continuously reconciling the live environment to match it.

✓ Kubernetes or other declarative platforms with many environments✓ Teams needing audit trails and pull-request approval for production changes✓ Fleets of clusters that must stay consistent✗ Imperative systems with no declarative representation✗ Tiny single-environment projects where a script suffices
deploymentestablished · medium burden

Golden Path

Offer an opinionated, well-supported default route for building and operating services so teams get productivity and compliance by default while retaining the freedom to deviate.

✓ Growing organisations with many teams and repeated setup work✓ Compliance needs that can be embedded in defaults✓ Platform teams seeking adoption through value rather than mandate✗ Very small teams where templates cost more than they save✗ Highly diverse workloads where no common case exists
observabilityestablished · low burden

Golden Signals Monitoring

Monitor any user-facing service with four signals (latency, traffic, errors, saturation) that cover most symptoms.

✓ Any request-serving production service✓ Standardizing dashboards across many teams✓ Choosing initial alerts for a new service✗ Batch or stream jobs where throughput and lag matter more✗ Deep root-cause analysis (signals show symptoms, not causes)
coordinationestablished · medium burden

Gossip Protocol

Spread membership and state information across a cluster by having nodes periodically exchange it with random peers.

✓ Cluster membership and failure detection in large clusters✓ Propagating metadata such as token ranges or load✓ Peer-to-peer or leaderless databases✗ State needing immediate strong consistency✗ Small clusters where a coordinator or registry is simpler
resilienceestablished · medium burden

Graceful Degradation

Keep delivering reduced but useful functionality when dependencies fail instead of failing the whole request.

✓ Pages composed from many independent services✓ Features with an acceptable cheaper substitute✓ Peak events where shedding optional work protects the core✗ Correctness-critical operations such as payments✗ Cases where stale data causes harm
architecture-descriptionestablished · high burden

GraphQL Best Practices

Design performant, secure, evolvable GraphQL APIs: schema design, N+1 prevention, complexity limiting, caching, versioning.

✓ Multiple clients with diverse data needs✓ Rapid frontend iteration (backend stable)✓ Complex relationships (graph-shaped data)✗ Simple CRUD (REST simpler)✗ Public APIs with unknown consumers
architecture-descriptionestablished · high burden

GraphQL Federation

Compose multiple GraphQL services into a single unified graph, enabling independent service ownership with unified client queries.

✓ Multiple teams owning GraphQL services✓ Clients need cross-domain queries✓ Schema evolution without coordination✗ Single team, single GraphQL service✗ Simple REST APIs sufficient
distribution-communicationestablished · medium burden

gRPC Patterns & Best Practices

Design efficient, evolvable gRPC services: unary, streaming, errors, versioning, gateway, testing.

✓ Internal service-to-service (low latency, high throughput)✓ Polyglot microservices (codegen per language)✓ Streaming required (real-time, bulk)✗ Public APIs (REST/GraphQL better)✗ Simple CRUD (REST simpler)
resilienceestablished · low burden

Health Check Endpoint

Expose a lightweight endpoint that reports whether an instance is alive and ready so orchestrators and load balancers can route around failures.

✓ Containers behind Kubernetes or load balancers✓ Auto-scaling groups that replace unhealthy instances✓ Rolling deployments needing readiness gating✗ Short-lived batch jobs✗ Single-instance systems with no router to act on the result
resilienceestablished · medium burden

Heartbeat

Detect failed nodes by having them periodically announce they are alive, and treating silence as failure.

✓ Cluster membership and leader election✓ Worker pools holding leases on tasks✓ Detecting dead connections in long-lived sessions✗ Systems where request-level errors already reveal failures quickly✗ Very large clusters without gossip or hierarchy
resilienceestablished · medium burden

Hedged Requests

Cut tail latency by sending a duplicate request to another replica when the first has not answered within a short delay.

✓ Idempotent reads against replicated data✓ Fan-out queries where p99 dominates✓ Systems with spare capacity and variable replica latency✗ Non-idempotent writes✗ Systems already near saturation
architecture-descriptionestablished · low burden

Hexagonal Architecture

Isolate application core logic from delivery mechanisms and infrastructure by communicating only through ports implemented by adapters.

✓ Long-lived business systems where infrastructure will change✓ Services needing multiple entry points over the same logic✓ Teams that want fast, infrastructure-free unit tests✗ Simple CRUD apps with little business logic✗ Short-lived prototypes or scripts
observabilityestablished · medium burden

High-Cardinality Management

Control the number of unique metric series and fields so telemetry stays queryable and affordable.

✓ Prometheus-style or hosted metrics with series-based pricing✓ Platforms serving many teams✓ After a cardinality-related outage or bill spike✗ Event stores built for wide, high-cardinality data✗ Small systems far from backend limits
data-consistencyestablished · medium burden

Hinted Handoff

Keep writes available during a replica outage by storing them temporarily on another node and replaying them when the replica returns.

✓ Dynamo-style leaderless stores with high write availability goals✓ Frequent short node outages or restarts✓ Systems using sloppy quorums✗ Strict quorum consistency requirements✗ Long outages where hints would pile up
scalingestablished · medium burden

Horizontal vs Vertical Scaling

Choose between adding bigger machines or more machines to meet growing load.

✓ Vertical: early stage or a single-node database with headroom✓ Horizontal: stateless web and API tiers✓ Horizontal: workloads that need fault tolerance as well as capacity✗ Horizontal scaling of a tightly coupled stateful monolith without redesign✗ Vertical scaling when already near the largest instance size
data-stateestablished · medium burden

Hot-Cold Data Tiering

Place data on storage whose cost and speed match how often it is accessed, moving it as it ages.

✓ Logs, events, metrics and audit trails with age-based access✓ Large media or document stores✓ Databases with time-partitioned tables✗ Data accessed uniformly regardless of age✗ Small datasets where savings are negligible
scalingestablished · medium burden

Hot Key Mitigation

Prevent a single disproportionately popular key from overloading one cache node or partition.

✓ Viral content, flash-sale products and popular configuration keys✓ Counters or rate-limit buckets with extreme write rates✓ Partitioned stores where one partition shows disproportionate load✗ Uniform access patterns where load is already balanced✗ Keys that need strict single-writer ordering
distribution-communicationestablished · medium burden

Hypermedia (HATEOAS)

Drive client navigation and available actions through links embedded in server responses rather than hard-coded URLs.

✓ Long-lived public APIs with many third-party clients✓ Workflows where allowed actions depend on state✓ APIs expected to reorganise URLs over time✗ Internal APIs with tightly coupled, co-deployed clients✗ Simple CRUD with stable endpoints
messagingestablished · low burden

Idempotency Key

Make any operation safely retryable by attaching a unique client-generated key that the server uses to detect and ignore duplicates.

✓ Any write operation exposed to retries (payments, orders, reservations)✓ Webhook endpoints receiving at-least-once delivery✓ API endpoints where clients implement retry logic✗ Read-only operations (GET is naturally idempotent)✗ Operations where duplicates are harmless or desired
data-consistencyestablished · low burden

Idempotency Patterns

Make operations safely retryable using idempotency keys, natural idempotency, and idempotent receivers — preventing duplicate side effects.

✓ Any POST/PATCH/DELETE exposed to retries✓ Webhook endpoints (at-least-once delivery)✓ Payment, order, reservation systems✗ GET (naturally idempotent)✗ High-throughput internal RPCs (exactly-once infra)
reliability-opsestablished · low burden

Idempotent Batch Jobs

Make batch jobs produce the same result when run multiple times so retries and reruns are safe.

✓ Scheduled pipelines with retries✓ Jobs that may need backfill or rerun✓ Outputs consumed by downstream jobs that must not see partial data✗ Inherently non-repeatable side effects such as sending email (use outbox and dedup instead)✗ Pure streaming with its own exactly-once mechanism
messagingestablished · medium burden

Idempotent Receiver

Make a consumer or API safely handle duplicate requests or messages so repeated delivery has the effect of one.

✓ Payments and any non-idempotent POST operations✓ Consumers of at-least-once message brokers✓ Webhook handlers and retried API calls✗ Operations already naturally idempotent such as PUT of full state✗ Pure reads
deploymentestablished · low burden

Immutable Infrastructure

Never modify running servers; replace them with freshly built images for every change.

✓ Autoscaled fleets and container platforms✓ Environments where drift and snowflake servers cause incidents✓ Security programmes that require frequent, verifiable patching✗ Stateful hosts where data lives on local disks with no replication✗ Very small setups where image pipelines cost more than they save
reliability-opsestablished · high burden

Incident Response Process

Structured incident response: detection, response, resolution, postmortem — reducing MTTR and preventing recurrence.

✓ Any production system with on-call✓ Team experiencing burnout or high MTTR✓ Repeated incidents, no learning✗ Pre-production (lightweight process)✗ Single-person team (simplify)
deploymentestablished · medium burden

Infrastructure as Code

Define and provision infrastructure through version-controlled code so environments are reproducible, reviewable and testable.

✓ Any non-trivial cloud footprint or multiple environments✓ Needing repeatable disaster recovery or per-branch environments✓ Compliance regimes requiring change records✗ One-off throwaway experiments✗ Resources managed fully by another system of record
coordinationestablished · medium burden

Inner Source

Apply open source collaboration practices inside an organization so teams can contribute to each other's code.

✓ Shared libraries or platforms with many consumers✓ Dependent teams frequently blocked on a core team✓ Large organizations with duplicated tooling✗ Code with strict access or compliance boundaries✗ No capacity for maintainers to review
data-stateestablished · medium burden

Inverted Index Search

Map terms to the documents that contain them so that text queries are answered without scanning every document.

✓ Product, document or log search✓ Queries needing relevance ranking, faceting and typo tolerance✓ Corpora too large for scanning relational text columns✗ Exact-match lookups served by a normal index✗ Small datasets where database full-text features suffice
resilienceestablished · low burden

Jitter

Add randomness to delays and schedules so many clients do not act at the same instant.

✓ Retry and reconnect logic✓ Cache TTLs and scheduled jobs shared by many clients✓ Periodic polling from large fleets✗ Operations that need exact timing such as financial cutoffs✗ Single clients with no contention
security-complianceestablished · low burden

JWT Validation at the Resource Server

Verify signed tokens locally and consistently so APIs can trust claims without calling the issuer on every request.

✓ Stateless APIs behind an OAuth/OIDC issuer✓ Microservices needing local identity checks✓ Gateways that forward verified claims downstream✗ Opaque session cookies already work well✗ Instant revocation is mandatory for every call
data-stateestablished · medium burden

Kappa Architecture

Handle all data processing as a stream over a replayable log, removing the separate batch path.

✓ Stream engine supports event-time, state and exactly-once✓ Logic changes require reprocessing history✓ Team wants one codebase for live and historical results✗ Heavy ad hoc joins over years of data fit batch better✗ Log retention for full history is unaffordable
architecture-descriptionestablished · high burden

Kubernetes Patterns

Design reliable, scalable Kubernetes applications: pod design, resource management, deployment strategies, observability, security.

✓ Containerized workloads at scale✓ Team ready for operational complexity✓ Multi-cloud / hybrid deployment needs✗ Simple workloads (ECS Fargate, Cloud Run simpler)✗ Team not ready for ops complexity
data-stateestablished · medium burden

Lakehouse Architecture

Combine cheap object-storage data lakes with warehouse-style transactions and SQL using open table formats.

✓ Both BI and ML need the same data✓ Want to avoid copying between lake and warehouse✓ Need updates, deletes and time travel on object storage✗ Small BI-only workloads fit a plain warehouse✗ Sub-second point lookups are needed
data-statelegacy · high burden

Lambda Architecture

Combine a batch layer for accurate recomputation with a speed layer for low-latency views over the same data.

✓ Streaming engine cannot yet match batch accuracy for your logic✓ Need both second-level freshness and audited historical totals✓ Regulatory need to recompute from raw data✗ Your stream processor supports replay and exactly-once (use kappa)✗ Small data where one batch job suffices
architecture-descriptionestablished · low burden

Layered Architecture

Organize code into horizontal layers with distinct responsibilities where each layer depends only on the one below.

✓ Typical business applications with moderate complexity✓ Teams new to architecture needing a shared convention✓ Systems where technical specialization maps to layers✗ Highly cohesive features that cut across all layers✗ Systems needing independent deployment per capability
scalingestablished · low burden

Lazy Loading

Defer loading data, code or resources until they are actually needed.

✓ Large bundles, below-the-fold images, and rarely used features✓ Object graphs where most associations are unused✓ Expensive initialization that some code paths never need✗ Resources needed immediately for first render or the main flow✗ Loops that would trigger one query per item (N plus 1)
coordinationestablished · low burden

Leader Election

Ensure exactly one instance performs a task (scheduler, processor, migrator) in a distributed system.

✓ Singleton background tasks (scheduler, migrator, aggregator)✓ Active-passive failover for stateful services✓ Distributed cron jobs✗ Stateless horizontal scaling (all instances should work)✗ Tasks that can run concurrently (partition instead)
coordinationestablished · low burden

Lease-Based Locks

Grant exclusive access for a bounded time so that a crashed holder cannot block others forever.

✓ Leader election and master ownership✓ Work claims such as job or partition ownership✓ Cache and read leases that bound staleness✗ Critical sections where a pause beyond the TTL would corrupt data and no fencing exists✗ Very short operations better served by compare-and-set
distribution-communicationestablished · medium burden

Load Balancing Algorithms

Choose the right load balancing algorithm: round-robin, least connections, least latency, consistent hashing — trade-offs for latency, distribution, and session affinity.

✓ Any service with multiple instances✓ Heterogeneous fleet (different instance types)✓ Session affinity needed (legacy apps)✗ Single instance✗ Stateless, homogeneous, low scale (round-robin fine)
resilienceestablished · medium burden

Load Shedding

Under overload, selectively drop low-priority requests to preserve capacity for high-priority work.

✓ Traffic spikes exceed provisioned capacity✓ Multi-tenant: protect paying customers✓ Critical paths must stay available (payments, auth)✗ All requests equally critical✗ Capacity planning sufficient (rare spikes)
observabilityestablished · high burden

Log Aggregation Pipeline

Collect, buffer, process, and index logs from all hosts into a central store so they can be searched during incidents.

✓ Fleets of containers or autoscaled instances✓ Needing cross-service search and audit trails✓ Compliance retention requirements✗ Single small application where local files suffice✗ Use as a metrics store, which is cheaper to serve as time series
distribution-communicationlegacy · low burden

Long Polling

Approximate server push by holding a request open until data is available or a timeout expires.

✓ Fallback when SSE or WebSockets are unavailable✓ Low-frequency events needing prompt delivery✓ Legacy or restrictive network environments✗ High-frequency event streams✗ Environments where SSE or WebSockets work fine
data-stateestablished · medium burden

LSM Tree Storage

Absorb high write volume by buffering writes in memory and flushing them as immutable sorted files that are merged in the background.

✓ Write-heavy workloads such as logs, events and metrics✓ Datasets larger than memory with mostly key-based access✓ Systems where sustained ingest rate matters more than point-read latency✗ Read-dominated workloads needing predictable low-latency point reads✗ Small datasets that fit comfortably in a B-tree
scalingestablished · medium burden

Materialized View

Pre-compute and store query results for fast reads, refreshed periodically or on data change.

✓ Complex aggregations, joins, window functions✓ Dashboard, reporting, user-facing analytics✓ Data freshness: minutes to hours OK✗ Real-time consistency required✗ Ad-hoc queries (unpredictable patterns)
data-stateestablished · medium burden

Medallion Architecture

Organize lakehouse data into progressively refined bronze, silver and gold layers.

✓ Lakehouse with many sources and consumers✓ Need reproducible reprocessing from raw data✓ Quality expectations differ for raw, cleaned and curated data✗ Single source feeding one report✗ Strict low-latency serving where extra hops hurt
architecture-descriptionestablished · low burden

Mermaid Diagrams

Describe architecture diagrams as text kept in version control so they are reviewable, diffable, and rendered automatically.

✓ Architecture docs maintained in the repository✓ Sequence and state descriptions that change with code✓ Teams that review documentation via pull requests✗ Dense diagrams needing precise manual layout✗ Audiences that need polished presentation graphics
messagingestablished · medium burden

Message Ordering

Guarantee that related messages are processed in the order they were produced, without serializing the whole system.

✓ State transitions of one entity must apply in sequence✓ Updates overwrite earlier values✓ Event sourced aggregates are projected from a stream✗ Messages are independent commutative operations✗ Consumers can resolve conflicts with timestamps or versions cheaply
architecture-descriptionestablished · medium burden

Microkernel Architecture

Keep a minimal stable core and extend functionality through independently developed plug-ins.

✓ Products with an extension ecosystem like IDEs or build tools✓ Customer-specific features without forking the product✓ Rule engines or workflows with swappable steps✗ Stable systems with a fixed feature set✗ When extension points cannot be predicted
deploymentestablished · low burden

Modular Monolith

Build a single deployable application composed of strongly isolated modules with explicit interfaces.

✓ Small to mid-size teams building a complex product✓ Early stage where domain boundaries are still evolving✓ Teams wanting autonomy without microservice operations✗ Parts that need independent scaling or different runtimes✗ Many teams that must release on independent cadences
security-complianceestablished · medium burden

Mutual TLS (mTLS)

Authenticate both client and server in every connection using certificates, enabling zero-trust service-to-service communication.

✓ Service-to-service communication in zero-trust✓ Regulatory: encryption in transit required✓ Multi-cluster, hybrid cloud✗ External APIs (clients can't do mTLS easily)✗ Legacy services that can't terminate TLS
data-consistencyestablished · high burden

Multi-Leader Replication

Accept writes at several nodes or regions and replicate them to each other to gain local write latency and regional availability.

✓ Geo-distributed apps needing local writes✓ Offline-capable clients that sync later, each acting like a leader✓ Multi-datacenter active-active deployments✗ Workloads with frequent conflicting writes to shared records✗ Strict constraints like unique keys and foreign keys across regions
scalingestablished · high burden

Multi-Region Active-Active

Serve traffic and accept writes in several regions simultaneously for low latency and regional fault tolerance.

✓ Global user base with tight latency targets✓ Availability goals exceed single-region capability✓ Data residency requires regional processing✗ Strong global consistency is mandatory on all writes✗ Traffic is regional and a warm standby suffices
deploymentestablished · high burden

Multi-Region Deployment

Run a service in several geographic regions for lower latency, higher availability and resilience to regional failure.

✓ Availability targets that exceed a single region's SLA✓ Global user bases needing low latency✓ Data residency or sovereignty requirements✗ Regional audience where a multi-zone single region meets the SLO✗ Strongly consistent global writes are required and latency is unacceptable
architecture-descriptionestablished · high burden

Multi-Tenancy Patterns

Share infrastructure across customers while isolating data, compute, and blast radius — patterns from shared DB to dedicated clusters.

✓ SaaS with >10 tenants✓ Regulatory data isolation (GDPR, HIPAA, FedRAMP)✓ Noisy neighbor risk (variable tenant load)✗ Single-tenant (dedicated deployment)✗ Very few tenants where dedicated is cheaper
resilienceestablished · low burden

N+1 Redundancy

Provision at least one more unit of capacity than the load requires so a single failure does not cause overload.

✓ Load-balanced stateless tiers✓ Storage and power or cooling systems✓ Systems that must tolerate rolling maintenance during failures✗ Dev and test environments✗ Workloads where elastic autoscaling can respond in time
architecture-descriptionestablished · medium burden

NFR Specification

Express non-functional requirements as measurable, testable targets so architecture can be designed and verified against them.

✓ Starting a new system or major redesign✓ Before choosing between architectural options✓ When contracts or compliance demand stated service levels✗ Throwaway prototypes✗ When numbers would be invented with no data source
security-complianceestablished · medium burden

OAuth 2.0 Authorization Code with PKCE

Let a client obtain tokens on a user's behalf without ever handling the user's credentials, safely even for public clients.

✓ Browser SPAs, native and mobile apps✓ Server-rendered apps that want OIDC login✓ Any third-party access to user data✗ Machine-to-machine calls (use client credentials)✗ Legacy implicit flow or password grant scenarios
observabilityestablished · high burden

Observability Patterns

Build comprehensive observability: three pillars + SLI/SLO, alerting, debugging workflows, cost control.

✓ Any production distributed system✓ Incident response: MTTR targets✓ Capacity planning: saturation signals✗ Simple monolith (logs + basic metrics sufficient)✗ Team not ready for instrumentation investment
observabilityestablished · high burden

Observability (Three Pillars)

Understand system internal state through external outputs: metrics (what), logs (why), traces (where).

✓ Any production distributed system✓ Incident response: MTTR targets✓ Capacity planning: saturation signals✗ Simple monolith (logs + basic metrics sufficient)✗ Team not ready for instrumentation investment
reliability-opsestablished · high burden

On-Call Rotation Design

Structure on-call duty so incidents are answered quickly while keeping load sustainable and fair for engineers.

✓ Any team operating a production service with an SLO✓ Teams with pager load that is unevenly shared✓ Moving from informal to formal operations✗ Very small teams that cannot form a safe rotation (consider shared on-call with a platform team)✗ Systems with no out-of-hours requirement
data-consistencyestablished · low burden

Optimistic Locking

Prevent lost updates in concurrent writes without blocking, using version numbers or timestamps to detect conflicts.

✓ Low conflict rate (<1% of writes)✓ Read-heavy workloads✓ Distributed systems (no distributed lock needed)✗ High conflict rate (pessimistic better)✗ Long transactions (version changes during read)
data-consistencyestablished · medium burden

Transactional Outbox Pattern

Guarantee atomic database update + message publish without distributed transactions, using an outbox table and relay.

✓ Any service that must publish events after DB changes✓ Microservices needing reliable event-driven communication✓ When 2PC is unavailable or undesirable✗ Single-service deployments with embedded broker (rare)✗ When eventual consistency of seconds is unacceptable
data-consistencyestablished · low burden

PACELC

Extend CAP by also modeling the latency versus consistency tradeoff that exists when there is no partition.

✓ Comparing replicated databases for global deployments✓ Setting read and write consistency levels✓ Explaining why strong consistency costs latency even when healthy✗ Single-region, single-node databases✗ When consistency needs are uniform and non-negotiable
architecture-descriptionestablished · low burden

Pagination (Cursor vs Offset)

Return large result sets in pages efficiently, avoiding performance cliffs and consistency issues.

✓ Any list endpoint returning >100 items✓ Concurrent writes to collection✓ Performance matters (mobile, infinite scroll)✗ Small, static datasets (<100 items)✗ Random access required (page 50 directly)
scalingestablished · high burden

Partitioning Strategies (Sharding)

Choose and implement partitioning strategy: hash, range, directory, consistent hashing — trade-offs for distribution, resharding, and query routing.

✓ Data > single node capacity (storage, CPU, connections)✓ Throughput > single node (100k+ QPS)✓ Multi-tenant isolation required✗ Single node sufficient with headroom✗ Complex cross-shard queries (joins, transactions)
scalingestablished · high burden

Partitioning (Sharding)

Distribute data and load across multiple nodes by partitioning on a key, enabling horizontal scale beyond single-node limits.

✓ Data size > single node capacity (TB+)✓ Throughput > single node (100k+ QPS)✓ Multi-tenant isolation required✗ Data fits on one node with room to grow✗ Complex cross-partition queries (joins, transactions)
coordinationestablished · medium burden

Paved Road Governance

Guide teams with a well-supported default path rather than mandates, keeping autonomy while reducing variance.

✓ Many teams building similar services✓ Platform team exists to maintain the path✓ Compliance requires consistent controls✗ Very few teams or products✗ Platform has no capacity to support the road
coordinationestablished · high burden

Paxos Overview

Reach agreement on a single value among unreliable nodes using proposers, acceptors and quorums.

✓ Understanding the theory behind consensus systems✓ Systems already built on Paxos variants such as Spanner or Chubby✓ Needing a flexible foundation for custom replicated state machines✗ Greenfield projects where Raft libraries suffice✗ Teams without experience in distributed protocol verification
security-complianceestablished · high burden

PII Tokenization Vault

Replace sensitive values with meaningless tokens so most systems never store or see the real data.

✓ Payment card data and government identifiers✓ Analytics pipelines that need linkage but not identity✓ Reducing PCI or privacy audit scope✗ Data needed in plaintext on every request✗ Low-sensitivity fields
architecture-descriptionestablished · medium burden

Pipes and Filters

Decompose a processing task into independent steps connected by channels so steps can be reordered, reused, and scaled separately.

✓ Data processing pipelines such as ETL, media encoding, or log enrichment✓ Compilers and request middleware chains✓ Steps with distinct scaling profiles✗ Steps that need heavy shared state or interactive back-and-forth✗ Simple operations where a single function is clear
economics-evolutionemerging · high burden

Platform Engineering

Build an Internal Developer Platform (IDP) that reduces cognitive load for stream-aligned teams through self-service, golden paths, and abstraction — not a ticket queue.

✓ Stream-aligned teams > 5✓ Teams reinventing CI/CD, K8s, observability✓ Cognitive load complaints from stream teams✗ Small org (<5 stream teams)✗ Teams happy with current tooling
data-stateestablished · high burden

Polyglot Persistence

Use different storage technologies for different data shapes and access patterns within one system.

✓ Distinct workloads such as transactions, full-text search and metrics in one product✓ Read patterns that a relational schema serves poorly✓ Organizations with the staff to run several datastores✗ Early-stage products where one relational database suffices✗ Small teams without on-call capacity for multiple engines
scalingestablished · medium burden

Precomputation and Denormalization

Compute or duplicate data at write time so that reads become simple lookups.

✓ Dashboards, feeds, counts and leaderboards✓ Read-heavy endpoints with stable query shapes✓ When joins across services or shards are too slow✗ Ad hoc queries whose shape is unpredictable✗ Data that changes faster than it is read
messagingestablished · medium burden

Priority Queue

Ensure urgent messages are processed ahead of less important ones, without starving the low-priority work completely.

✓ Mixed interactive and batch workloads share a pipeline✓ SLAs differ by customer tier or message type✓ Bursts of bulk work must not delay critical jobs✗ All messages have similar urgency✗ Strict global fairness is required
deploymentestablished · medium burden

Progressive Delivery

Release changes to progressively larger audiences while measuring impact, with automatic halting or rollback when metrics degrade.

✓ High-traffic services where defects are costly✓ Teams deploying many times per day✓ Changes with uncertain performance or behavioural impact✗ Services with too little traffic for statistically meaningful signals✗ Changes that are all-or-nothing, such as incompatible schema flips
messagingestablished · medium burden

Publish-Subscribe

Decouple producers from consumers by broadcasting messages to a topic that any number of independent subscribers receive.

✓ One event interests many independent consumers✓ Consumers are added or removed without coordinating with the producer✓ Producers must not be slowed by consumer speed✗ The caller needs an immediate response from a single callee✗ Strict global ordering across all subscribers is required
data-consistencyestablished · medium burden

Quorum Reads and Writes

Tune consistency and availability by requiring a configurable number of replicas to acknowledge each read and write.

✓ Leaderless stores such as Dynamo-style databases✓ Workloads needing per-request consistency tuning✓ Systems that must stay writable during node failures✗ Needs strict linearizability or transactions✗ Highly contended keys with frequent concurrent writes
coordinationestablished · medium burden

Raft Consensus

Keep a replicated log consistent across nodes using an understandable leader-based consensus algorithm.

✓ Metadata stores, coordination services and config that need linearizable state✓ Replicated databases needing strong consistency per shard✓ Building a small control plane of 3 to 7 nodes✗ Geo-distributed writes needing low latency everywhere✗ High-volume data plane traffic that one leader cannot absorb
resilienceestablished · low burden

Rate Limiting Algorithms

Compare rate limiting algorithms: token bucket, leaky bucket, fixed window, sliding window — trade-offs and use cases.

✓ Any rate limiting implementation✓ Choosing algorithm for new limiter✓ Debugging rate limiter behavior✗ No rate limiting needed✗ Team not implementing limiter
traffic-managementestablished · low burden

Rate Limiting

Control the rate of requests to a service or API to prevent abuse, ensure fair usage, and protect against denial-of-service attacks.

✓ Any public API or service exposed to external clients✓ Protecting against DoS attacks and abuse✓ Ensuring fair usage among multiple tenants✗ Internal APIs with trusted clients and known load patterns✗ Real-time systems where rate limiting introduces unacceptable latency
security-complianceestablished · medium burden

RBAC vs ABAC Authorization

Choose and implement an authorization model that grants access by role for simplicity or by attributes and context for fine-grained control.

✓ Multi-tenant SaaS with ownership rules✓ Regulated data needing auditable access decisions✓ Growing role counts that are hard to manage✗ Tiny apps with two or three static roles✗ Relationship-heavy sharing like documents (consider ReBAC)
scalingestablished · medium burden

Read Replica

Scale read throughput by replicating data to follower nodes that serve read queries, while primary handles writes.

✓ Read-heavy workloads (analytics, reporting, user-facing reads)✓ Can tolerate eventual consistency for reads✓ Need to offload long-running queries from primary✗ Write-heavy workloads✗ Strong consistency required for all reads
data-consistencyestablished · low burden

Read-Your-Writes Consistency

Guarantee that a client always sees its own prior writes even when reads are served from lagging replicas.

✓ User-facing apps with read replicas and async replication✓ Profile edits, posts and settings that users view immediately✓ Systems where eventual consistency is acceptable for others viewing data✗ Fully synchronous or single-node databases✗ Data where users never read back their own writes quickly
reliability-opsestablished · medium burden

Reconciliation Job

Periodically compare two sources of truth, detect drift, and repair or flag differences so that eventual consistency actually converges.

✓ Payments and ledgers versus provider reports✓ Derived stores such as search indexes and caches✓ Event-driven systems where consumers may miss or fail on events✗ Systems with strong, transactional single-source consistency✗ When drift cannot be defined because no authoritative side exists
observabilityestablished · low burden

RED Method

Instrument every microservice with request Rate, Errors, and Duration to get a consistent view of service health.

✓ Request-driven microservices and APIs✓ Platform teams standardizing telemetry✓ Service-level dashboards for on-call✗ Resources such as disks, hosts, or queues (use USE)✗ Batch jobs without a request concept
data-stateestablished · high burden

Database Replication

Copy data across database nodes for availability, read scaling, and disaster recovery, understanding sync vs async trade-offs.

✓ Any production database needing HA✓ Read scaling (async replicas)✓ Geo-distribution (async cross-region)✗ Dev/test (single node fine)✗ Team not ready for failover drills
data-stateestablished · low burden

Repository Pattern

Provide a collection-like interface for retrieving and storing aggregates, hiding persistence details from the domain.

✓ Rich domain models using aggregates✓ Need to swap or fake persistence in tests✓ Multiple data sources behind one domain concept✗ Simple CRUD where the ORM already suffices✗ Read-heavy reporting that needs flexible queries
scalingestablished · low burden

Request Coalescing

Merge identical concurrent requests into one upstream call and share the result among all waiters.

✓ Cache misses on popular keys✓ Idempotent reads to slow or costly dependencies✓ CDN or proxy layers fronting an origin✗ Writes or non-idempotent operations✗ Per-user requests that cannot be shared
messagingestablished · medium burden

Request-Reply over Queues

Get a response to a request using asynchronous queues, with a correlation id linking the reply to the original request.

✓ Work is slow and callers should not hold connections✓ Services are decoupled behind a broker✓ Multiple responders can share the load✗ Low-latency synchronous calls are the norm✗ Fire-and-forget events suffice
resilienceestablished · low burden

Retry Budget

Limit retries to a fixed fraction of normal traffic so retries help with transient errors but cannot amplify an outage.

✓ Service meshes and client libraries making many calls✓ Deep call chains with retries at multiple layers✓ Dependencies prone to brownouts under load✗ Low-volume clients where a ratio is meaningless✗ Non-retryable operations
resilienceestablished · low burden

Retry with Exponential Backoff

Handle transient failures by retrying with increasing delays, avoiding thundering herd and giving downstream time to recover.

✓ Idempotent operations (GET, PUT with idempotency key)✓ Transient failure scenarios: network, throttling, brief unavailability✓ Combined with circuit breaker (retry while closed, fail fast when open)✗ Non-idempotent operations without idempotency key✗ Permanent errors (4xx except 429, invalid input)
decision-makingestablished · medium burden

RFC Process

Make significant technical decisions through written proposals reviewed asynchronously by affected stakeholders.

✓ Changes affecting multiple teams or public APIs✓ Choices that are expensive to reverse✓ Introducing new infrastructure or shared libraries✗ Small, reversible, single-team changes✗ Urgent incident mitigation
deploymentestablished · low burden

Rolling Update

Replace instances of a service gradually in small batches so capacity and availability are maintained throughout the release.

✓ Stateless services behind a load balancer✓ Default deployment strategy on orchestrators like Kubernetes✓ When doubling capacity for blue-green is too costly✗ Changes incompatible between consecutive versions✗ Need for instant all-at-once cutover or instant rollback
reliability-opsestablished · medium burden

Runbook (Operational Playbook)

Documented, step-by-step procedures for common operational tasks and incident response, reducing MTTR and cognitive load during incidents.

✓ Any production service✓ On-call rotation exists✓ Incident MTTR > target✗ Pre-production environments✗ Fully automated self-healing (no human needed)
data-consistencyestablished · high burden

Saga Pattern

Manage distributed transactions across services without 2PC, using a sequence of local transactions with compensating actions.

✓ Long-running business processes across service boundaries✓ When eventual consistency is acceptable (seconds to minutes)✓ When 2PC is unavailable or undesirable✗ Short-lived operations where synchronous ACID works✗ When strong consistency is required (financial ledger)
data-consistencyestablished · high burden

Saga Patterns (Choreography vs Orchestration)

Manage distributed transactions across services without 2PC, using choreography (events) or orchestration (central coordinator) with compensating actions.

✓ Long-running business processes across service boundaries✓ When eventual consistency is acceptable (seconds to minutes)✓ When 2PC is unavailable or undesirable✗ Short-lived operations where synchronous ACID works✗ When strong consistency is required (financial ledger)
messagingestablished · medium burden

Scatter-Gather

Send a request to several recipients in parallel and combine their replies into one result.

✓ Querying sharded indexes or partitions✓ Comparing quotes from multiple providers✓ Redundant calls to cut tail latency✗ Dependent steps where each needs the prior result✗ Expensive requests where fan-out cost outweighs value
data-stateestablished · medium burden

Schema Evolution

Change data schemas over time without downtime by keeping old and new readers and writers compatible.

✓ Zero-downtime deployments against a live database✓ Event streams and APIs with long-lived consumers✓ Teams deploying independently of data consumers✗ Offline systems where a maintenance window is acceptable✗ Throwaway prototypes
security-complianceestablished · medium burden

Centralized Secrets Management

Keep credentials out of code and config, issue them on demand with strong identity, and rotate them automatically.

✓ Any system with database, API or signing credentials✓ Multiple services and environments✓ Compliance regimes demanding rotation and audit✗ Throwaway prototypes with no real data✗ Public configuration values that are not secret
security-complianceestablished · low burden

Security Headers

Harden HTTP responses with security headers to mitigate XSS, clickjacking, MIME sniffing, and other client-side attacks.

✓ All public-facing web applications✓ API endpoints serving HTML/JS✓ Compliance: PCI DSS, HIPAA, SOC2✗ Internal APIs (no browser)✗ Legacy apps with inline scripts everywhere (CSP hard)
security-complianceestablished · high burden

Security Patterns

Comprehensive security patterns: authentication, authorization, encryption, secrets, supply chain, runtime — defense in depth.

✓ Any production system✓ Regulatory requirements (SOC2, PCI, HIPAA, GDPR)✓ Customer trust is business critical✗ Pre-product (security debt acceptable)✗ Team not ready for security investment
resilienceestablished · low burden

Self-Healing Watchdog

Automatically detect stuck or failed components and restart or replace them without human intervention.

✓ Long-running daemons and workers✓ Containerized services under an orchestrator✓ Embedded and edge devices without operators nearby✗ Faults caused by bad data or configuration that a restart cannot fix✗ Stateful processes where restart risks corruption without recovery logic
distribution-communicationestablished · low burden

Server-Sent Events

Stream one-way server-to-client updates over a long-lived HTTP response.

✓ Live feeds, notifications, progress bars, dashboards✓ Server pushes only; client uses normal requests to send data✓ Environments where WebSockets are blocked or unneeded✗ Bidirectional low-latency messaging such as games or chat typing✗ Binary payloads
architecture-descriptionestablished · medium burden

Serverless Architecture Patterns

Design reliable, cost-effective serverless systems: function design, cold starts, orchestration, observability, cost optimization.

✓ Event-driven, bursty, unpredictable workloads✓ Team wants minimal ops overhead✓ Pay-per-use aligns with business model✗ Constant high throughput (EC2/ECS cheaper)✗ Sub-10ms latency requirements
distribution-communicationestablished · medium burden

Service Discovery

Enable services to find each other dynamically in distributed systems, supporting scaling, failures, and deployments.

architecture-descriptionestablished · high burden

Service Mesh

Dedicated infrastructure layer for service-to-service communication: mTLS, traffic management, observability, resilience — without application code changes.

✓ 50+ services with complex service-to-service communication✓ Need consistent mTLS without app changes✓ Platform team owns infrastructure, app teams own business logic✗ Small number of services (<20)✗ Team lacks platform engineering capacity
traffic-managementestablished · medium burden

Shadow Traffic

Copy live production requests to a new version whose responses are discarded, validating behaviour and performance with zero user impact.

✓ Rewrites, migrations and replacement of a critical dependency✓ Capacity validation of new infrastructure under real load✓ Comparing outputs of a new algorithm against the incumbent✗ Requests with non-idempotent side effects you cannot isolate, such as payments and emails✗ Privacy-restricted data that may not leave the production boundary
resilienceestablished · medium burden

Shuffle Sharding

Assign each tenant a small random subset of workers so a noisy or poison tenant affects only a tiny fraction of others.

✓ Multi-tenant services with shared worker fleets✓ DNS, queue, and API platforms exposed to untrusted traffic✓ Protecting against request-of-death failures✗ Single-tenant systems✗ Very small fleets with too few combinations
distribution-communicationestablished · medium burden

Sidecar

Deploy supporting functionality in a separate process or container that shares the lifecycle and network namespace of the main application.

✓ Polyglot fleets needing uniform networking, security or telemetry✓ Adding capability to legacy apps without changing code✓ Concerns that must follow each instance such as log shipping✗ Very small deployments where a library is simpler✗ Latency budgets too tight for an extra hop
observabilityestablished · medium burden

SLI / SLO / Error Budgets

Define reliability in business terms: what to measure (SLI), what's acceptable (SLO), and how much unreliability you can spend (error budget).

✓ Any service with reliability requirements✓ Teams arguing about reliability vs features✓ Need data-driven prioritization✗ Pre-product-market fit (no users to disappoint)✗ Internal tools with no SLA
data-stateestablished · medium burden

Slowly Changing Dimensions

Track how descriptive attributes of dimension records change over time in an analytical model.

✓ Reports must reflect attributes as of the transaction date✓ Audit requires change history of dimensions✓ Attributes like region or tier change infrequently✗ Attributes change very frequently (use a mini-dimension or event table)✗ History is never needed
data-stateestablished · low burden

Soft Delete

Mark records as deleted instead of physically removing them so they can be restored, audited or purged later.

✓ User-facing data where undo or recycle bin is expected✓ Records referenced by history, billing or audit✓ Systems with retention windows before true erasure✗ Data that must be erased immediately for privacy compliance✗ High-churn tables where dead rows dominate size
decision-makingestablished · low burden

Specification Pattern

Encapsulate a business rule as a composable object that can test, select, or construct domain objects.

✓ Rules reused across validation and selection✓ Business rules that change often or vary by customer✓ Complex filter combinations needing readable composition✗ One-off simple conditions✗ Performance-critical queries needing hand-tuned SQL
security-complianceestablished · medium burden

SSRF and Injection-Safe Design

Design request handling so untrusted input can neither choose where the server connects nor change the meaning of a command or query.

✓ Webhooks, link previews, file import by URL✓ Any code building queries, commands or templates from input✓ Services running in clouds with metadata endpoints✗ Services with no user-influenced outbound calls (still parameterize queries)✗ As a replacement for authorization
resilienceestablished · medium burden

Static Stability

Design systems so the data plane keeps working with its last known state when the control plane or a dependency is unavailable.

✓ Cloud infrastructure and API platforms✓ Multi-zone deployments that must survive a zone loss✓ Systems where recovery paths share fate with the failure✗ Prototype systems where cost matters more than availability✗ Workloads that can tolerate minutes of recovery
economics-evolutionestablished · high burden

Strangler Fig for APIs

Replace a legacy API gradually by routing endpoints one at a time to a new implementation behind a stable facade.

✓ Legacy API too large or risky to rewrite at once✓ Clients depend on stable public URLs✓ Need continuous delivery during migration✗ Small API easily rewritten in a sprint✗ Legacy system cannot be fronted by a proxy
economics-evolutionestablished · high burden

Strangler Migration Planning

Plan the replacement of a legacy system slice by slice, with measurable progress and a retirement date.

✓ Legacy system too large to rewrite at once✓ Business cannot tolerate long feature freeze✓ Interfaces to the legacy system can be intercepted✗ System is small enough to replace quickly✗ No seam for a routing facade exists
messagingestablished · high burden

Stream Processing

Continuously compute over unbounded event streams using windows, state and event-time semantics.

✓ Results needed in seconds or less✓ Per-key running state such as sessions or counters✓ Continuous enrichment or anomaly detection✗ Daily reports where batch is simpler and cheaper✗ Logic needs full dataset scans each time
messagingestablished · high burden

Stream Windowing

Group an unbounded event stream into finite windows so aggregations can be computed and emitted.

✓ Metrics, rate limits or fraud signals over time ranges✓ Sessionization of user activity✓ Joining streams within a time bound✗ Results need exact all-time totals✗ Event timestamps are unreliable
observabilityestablished · low burden

Structured Logging

Emit logs as structured data (JSON) with consistent fields, enabling querying, alerting, and correlation across services.

✓ All services in distributed system✓ Centralized log aggregation✓ Alerting on log patterns (error rates, latency)✗ Local development (pretty console output preferred)✗ Extremely high-frequency internal loops (use metrics)
observabilityestablished · medium burden

Synthetic Monitoring

Continuously exercise critical user journeys with scripted probes to detect outages before real users report them.

✓ Critical journeys such as login and checkout✓ Low-traffic or newly launched services✓ Checking edge, DNS, and certificate health✗ Replacing real user monitoring for coverage of actual behavior✗ Flows that cannot be made side-effect free
scalingestablished · medium burden

Tail Latency Reduction with Hedged Requests

Reduce p99 latency by sending a duplicate request to another replica when the first is slow.

✓ Read-only fan-out queries across many shards✓ Latency-sensitive paths with multiple equivalent replicas✓ Services where p99 dominates user experience✗ Non-idempotent writes✗ Systems already near capacity, where duplicates worsen overload
economics-evolutionestablished · high burden

Team Topologies

Design team structures that optimize for flow, autonomy, and cognitive load — applying Team Topologies patterns (stream-aligned, platform, enabling, complicated-subsystem).

✓ Org > 50 engineers✓ Cross-team dependencies slowing delivery✓ Platform team becoming bottleneck✗ Small org (<30 engineers)✗ Single product, simple domain
economics-evolutionestablished · medium burden

Technical Debt Management

Systematically identify, prioritize, and pay down technical debt — treating it as a portfolio with interest rates, not a dirty word.

✓ Any team with codebase > 6 months old✓ Velocity declining, bugs increasing✓ Onboarding new engineers takes months✗ Pre-product-market fit (velocity > quality)✗ Team not ready for measurement discipline
decision-makingestablished · low burden

Technology Radar

Publish a living, opinionated map of technologies the organization adopts, trials, assesses, or holds.

✓ Many teams make independent technology choices✓ You need to steer toward a smaller supported stack✓ Onboarding engineers who ask which tools are approved✗ A single small team shares one stack✗ The radar would be a mandate with no feedback loop
architecture-descriptionemerging · medium burden

Temporal Workflows (Durable Execution)

Write reliable, long-running business logic as code that survives crashes, retries automatically, and provides full observability — without managing queues, state machines, or timers manually.

✓ Long-running business processes (orders, onboarding, claims)✓ Human-in-the-loop workflows (approvals, reviews)✓ Reliable orchestration of microservices✗ Simple request-response (overhead not justified)✗ Sub-second latency requirements (workflow overhead)
architecture-descriptionestablished · high burden

Tenant Isolation (Multi-Tenancy)

Share infrastructure across customers while isolating their data, compute, and blast radius.

✓ SaaS with >10 tenants✓ Regulatory data isolation (GDPR, HIPAA, FedRAMP)✓ Noisy neighbor risk (variable tenant load)✗ Single-tenant (dedicated deployment)✗ Very few tenants where dedicated is cheaper
scalingestablished · high burden

Sharding by Tenant

Distribute data and load across shards using the tenant identifier as the partition key.

✓ B2B SaaS where queries are scoped to one tenant✓ Tenants with data residency or isolation requirements✓ When one database no longer fits all tenants✗ Workloads dominated by cross-tenant analytics or joins✗ Few tenants where one is overwhelmingly large and cannot be split
data-stateestablished · medium burden

Time-Series Storage

Store timestamped measurements in time-partitioned, compressed form optimized for append-heavy writes and range queries.

✓ Infrastructure and application metrics✓ IoT and sensor telemetry✓ Financial ticks or event streams queried by time range✗ Data queried mainly by entity rather than time✗ Low-volume data a regular table handles easily
resilienceestablished · medium burden

Timeout Budget

Allocate a fixed end-to-end time limit across the hops of a request so the total never exceeds what the caller will wait.

✓ Multi-hop synchronous request chains✓ User-facing APIs with a latency SLO✓ Fan-out calls where the slowest dependency dominates✗ Long-running batch jobs with no caller waiting✗ Purely asynchronous workflows
security-complianceemerging · medium burden

Token Exchange for Service-to-Service Calls

Swap an incoming token for a new one scoped to a specific downstream audience, preserving user context with minimal privilege.

✓ Microservices acting on behalf of a user✓ Crossing trust domains or identity providers✓ Narrowing broad edge tokens to per-service tokens✗ Single monolith with no downstream hops✗ Pure machine calls with no user context
distribution-communicationestablished · low burden

Tolerant Reader

Let consumers read only what they need and ignore unknown data, so providers can evolve without breaking them.

✓ Independently deployed services sharing JSON or Protobuf contracts✓ Public API clients and SDKs✓ Event consumers reading evolving schemas✗ Security-sensitive input where unexpected data must be rejected✗ Provider-side validation of incoming requests
decision-makingestablished · low burden

Tradeoff Analysis

Compare architectural options against ranked quality attributes to expose risks, sensitivities, and tradeoffs before committing.

✓ Choosing between datastores, protocols, or deployment models✓ Decisions that are costly to reverse✓ When stakeholders disagree on priorities✗ Reversible, low-impact choices✗ When only one viable option exists
messagingestablished · medium burden

Transactional Inbox

Record each incoming message in the local database within the same transaction as its effects, so redelivery is detected and processing is atomic.

✓ Consumer owns a relational store and needs dedup✓ Handlers must be atomic with state changes✓ Messages arrive at least once from the broker✗ Handlers are naturally idempotent✗ No transactional local store exists
deploymentestablished · low burden

Trunk-Based Development

Integrate small changes into a single shared branch at least daily, keeping it always releasable and hiding unfinished work behind flags.

✓ Teams practising continuous integration and frequent deploys✓ Products with fast automated test suites✓ Organisations wanting to remove long release stabilisation phases✗ Weak test coverage that cannot guard main✗ Open source projects with untrusted contributors needing gated review
data-consistencyestablished · high burden

Try-Confirm-Cancel

Coordinate multi-service business transactions using explicit reserve, confirm and compensate operations instead of long-held locks.

✓ Payments, bookings and inventory where a reservation is natural✓ Cross-service flows needing stronger isolation than sagas✓ Participants that can implement hold and release semantics✗ Operations with no meaningful reserve step✗ Simple flows where a saga suffices
data-consistencylegacy · high burden

Two-Phase Commit

Commit a transaction atomically across multiple resource managers so all commit or all abort.

✓ Few participants within one trust boundary needing strict atomicity✓ Databases supporting XA or prepared transactions✓ Short transactions with reliable low-latency networks✗ Long-running business processes across services✗ Participants across unreliable or public networks
data-consistencyestablished · low burden

Unit of Work

Track changes made during a business operation and commit them together as a single atomic transaction.

✓ Use cases touching several repositories in one database✓ When using an ORM with change tracking✓ To collect domain events and publish after commit✗ Single-statement operations✗ Across independent services, which need sagas rather than local transactions
observabilityestablished · medium burden

USE Method

Systematically find resource bottlenecks by checking Utilization, Saturation, and Errors for every resource.

✓ Diagnosing latency or throughput regressions✓ Building infrastructure dashboards✓ Capacity reviews for hosts and pools✗ Describing request health of a service (use RED)✗ Problems caused by logic bugs, not resources
data-consistencyestablished · medium burden

Vector Clocks

Track causal ordering of events across replicas so concurrent updates can be detected rather than silently overwritten.

✓ Leaderless or multi-leader stores that accept concurrent writes✓ Needing to detect conflicts instead of last-write-wins✓ Causal consistency tracking between replicas✗ Single-leader systems with a total order✗ Data where losing a concurrent write is acceptable
economics-evolutionestablished · medium burden

Vendor Lock-in Mitigation

Limit the cost and risk of leaving a vendor by deciding where to accept lock-in and where to keep options.

✓ Critical dependency on one vendor✓ Contracts renewing with uncertain pricing✓ Regulatory or sovereignty requirements may force change✗ Low-criticality commodity services✗ Proof-of-concept stage with unproven needs
architecture-descriptionestablished · low burden

Vertical Slice Architecture

Organize code by feature or request so each slice contains everything from interface to data access.

✓ Feature-driven products with frequent, independent changes✓ Teams wanting low coupling between features✓ CQRS-style systems with distinct commands and queries✗ Teams needing a rigid uniform structure for onboarding✗ Highly shared domain logic spread across many operations
security-complianceestablished · medium burden

WAF and Edge Protection

Filter hostile traffic at the network edge before it reaches origin services.

✓ Public web apps and APIs✓ Need for virtual patching during vulnerability windows✓ Login and checkout endpoints under bot pressure✗ Purely internal services behind private networking✗ As the sole defense against injection or authorization flaws
distribution-communicationestablished · medium burden

Webhook

Enable real-time server-to-server notifications via HTTP callbacks, avoiding polling.

✓ Third-party integrations (Stripe, GitHub, Slack)✓ Cross-organization event notification✓ Consumer-controlled endpoints✗ High-throughput internal services (use message broker)✗ Consumer can't receive HTTP (firewall, no public endpoint)
distribution-communicationestablished · high burden

WebSockets

Provide a persistent bidirectional channel between client and server for low-latency interactive messaging.

✓ Chat, multiplayer, collaborative editing✓ High-frequency bidirectional updates✓ Binary or mixed payloads over a single connection✗ Simple server-to-client notifications that SSE handles✗ Infrequent updates where polling or webhooks suffice
data-stateestablished · medium burden

Write-Ahead Log

Guarantee durability and atomicity by recording every change to an append-only log before applying it to the main data structures.

✓ Any storage engine that updates state in place✓ Replicating changes to replicas or downstream consumers✓ Systems needing point-in-time recovery✗ Purely ephemeral caches where loss is acceptable✗ Immutable append-only stores where the data file is itself the log
scalingestablished · medium burden

Write-Through and Write-Behind Caching

Keep a cache synchronized with the store by writing through it, either synchronously or asynchronously.

✓ Write-through: read-after-write freshness with a read-heavy mix✓ Write-behind: bursty or counter-style writes where only the latest value matters✓ When the database is the throughput bottleneck for writes✗ Write-behind for financial or other data that cannot be lost✗ Data that is written once and rarely read, where caching wastes memory
security-complianceemerging · high burden

Zero Trust Architecture

Never trust, always verify. Authenticate and authorize every request based on identity and context, not network location.

✓ Remote/hybrid workforce✓ Multi-cloud, hybrid infrastructure✓ Regulatory: zero trust mandated (FedRAMP, NIST 800-207)✗ Simple, on-prem only, small attack surface✗ Legacy apps that can't do mTLS/OIDC