Distributed Systems Architecture Patterns Cheat Sheet

Posted on Jan 13, 2025

A quick reference guide for distributed systems architecture patterns, covering when to use each pattern and the classic problems they solve.

Distributed Systems Architecture Patterns Cheat Sheet

#

PatternCore IdeaWhen to UseClassic Problems
Caching (cache-aside / write-through / write-back)Keep hot data close to the appRead-heavy workloads, expensive queries, slow upstreamsSpeed up product pages, session stores, ranking feeds
CDNPush static/streamable assets to edgeGlobal users, large media, static bundlesImage/CSS delivery, video streaming, downloads
Load Balancing (L4/L7)Spread traffic across instancesScale stateless services, HAWeb/API tier scaling, zero-downtime deploys
Rate Limiting & ThrottlingControl request volume per key/clientProtect downstream services, fair usagePublic APIs, login abuse protection
Circuit BreakerFail fast when a dependency is unhealthyPrevent cascades, degrade gracefullyPayment gateway outage, flaky search backend
BackpressureSignal producers to slow downSpiky traffic, limited consumersUpload pipelines, stream processing stability
Retry + IdempotencySafe replays of failed opsUnreliable networks, async workflowsOrder creation, webhook delivery
Read ReplicasOffload reads from primary DBRead-heavy, reporting, geo-readsAnalytics pages, timelines, leaderboards
Sharding (Hash/Range/Geo)Split data across nodesData > single node, parallelismMulti-TB user tables, geo data stores
Replication (Sync/Async)Keep copies for HA & readsAvailability, DR, low-latency readsActive-passive failover, follower reads
CQRSSeparate read/write modelsComplex reads + high write throughputEvent feeds, denormalized dashboards
Event SourcingState = log of eventsFull audit, rebuild state, temporal queriesLedger systems, order state timelines
Message Queue / Stream (SQS/Kafka)Async decoupling via durable logsSpikes, fan-out, ordered pipelinesEmail/SMS, ETL, clickstream processing
Saga (Orchestration/Choreography)Distributed transaction via steps + compensationCross-service workflows without 2PCBook-pay-reserve flows, refunds
Search Index (ES/OpenSearch)Inverted index for fast text/filtersFull-text, aggregations, relevanceProduct search, logs explorer
Time-Series DBAppend-heavy metrics optimized by timeMonitoring, IoT, financial ticksPrometheus/TSDB, sensor data
Write-Optimized Stores (LSM)Fast writes, compaction laterHigh ingest, occasional readsAudit/event logs, analytics ingest
Geo-Replication / Geo-ShardingPlace data near usersLow latency, data residencyMulti-region apps, GDPR residency
Consistency Models (Strong/Eventual)Pick latency vs guaranteesCross-region apps, offline toleranceCart totals vs likes counters
API GatewayCentral entry: auth, routing, limitsMany services, uniform policiesPublic API front door, mTLS termination
Webhooks & OutboxesReliable external notificationsIntegrations, third-party callbacksPayment status updates, CRM sync
Blob/Object StorageCheap infinite filesMedia, backups, exportsUser uploads, data lakes
Workflow Orchestrator (Airflow/Temporal)Durable, reliable step with stateLong-running jobs, SLAsReport generation, video pipelines
Blue-Green / Canary DeploysShift traffic graduallySafer releases, quick rollbackAPI rollout, config changes
Feature FlagsRuntime on/off % rolloutsExperimentation, kill-switchesA/B tests, dark launches
Schema Migration StrategyBackward-/forward-compatible changesZero-downtime DB upgradesExpand-migrate-contract patterns
Distributed Locks / Leader ElectionCoordinate one active workerCron uniqueness, shared ownershipSingle consumer, partition leader
Observability (Logs/Metrics/Traces)See what the system is doingSLOs, debugging, capacity planningP99 latency, error budgets, trace trees
Security: AuthN/AuthZVerify identity and permissionsMulti-tenant products, external APIsOAuth2/OIDC, RBAC/ABAC
Multi-Tenancy (Pool/Bridge/Isolated)Resource & data isolation levelsSaaS with many customersPer-tenant DBs vs shared schema
Edge Compute / FunctionsRun logic near the userLatency-sensitive, light workloadsPersonalization at edge, AB tests
Rate-Aware DB PatternsBatch, queue, throttle at DB edgeHot partitions, lock contentionBulk imports, ID sequence hot-spot
Pagination StrategiesKeyset + Offset for big dataInfinite scroll, large tablesFeed pagination, admin lists

How to Use This Cheat Sheet

#