27 articles in high level design › patterns.
Learn how the circuit breaker pattern stops cascading failures by failing fast on broken dependencies, and how three states protect your system.
How to implement retries safely: exponential backoff, full vs. equal jitter, retry budgets, idempotency requirements, and when retrying makes things worse instead of better.
Learn how the bulkhead pattern isolates resource pools to contain failures—so one slow dependency can never exhaust your thread pool and take down every unrelated feature.
How dead-letter queues isolate poison-pill messages, prevent consumer stalls, enable inspection and replay, and how to set up DLQ depth alerting before backlog silently grows.
Learn how the saga pattern maintains data consistency across microservices without distributed locks, and why compensating transactions are the key to surviving partial failure.
Learn how the Outbox pattern eliminates the dual-write problem in distributed systems, guaranteeing every database write produces its corresponding event even when brokers and services crash mid-flight.
Learn how event sourcing stores state as an immutable event log, enabling audit trails, time travel queries, and replayable projections at any scale.
Learn how CQRS separates reads from writes into independent models so each can be optimized, scaled, and evolved without the other paying the cost.
How CDC extracts database change events using log tailing, triggers, or dual-write. Covers Debezium with PostgreSQL WAL, use cases for CDC in event-driven architectures, and the tradeoffs of each approach.
Why microservices need isolated databases, the cross-service query and consistency challenges this creates, and the practical strategies (CQRS, API composition, sagas) for working around shared-data limitations.
How materialized views pre-compute and cache expensive query results for fast reads, when to use them, how to keep them fresh, and the consistency tradeoffs of each refresh strategy.
How to scale message processing by running multiple consumers against the same queue. Covers partition assignment, consumer group rebalancing, at-least-once delivery, and idempotency requirements.
Fan-out write vs. fan-out read for social feeds and notifications. When each model breaks down, the hybrid threshold-based approach used by Twitter and Instagram, and how push-on-write affects storage.
How scatter-gather fans out a request to multiple services in parallel, collects results, and merges them. Covers partial response handling, timeout strategies, and when to gate on all vs. some responses.
How distributed systems elect a single leader using ZooKeeper ephemeral nodes, etcd leases, or Redis SETNX. Covers fencing tokens, split-brain prevention, and when you actually need leader election.
How read repair fixes stale replicas during normal read operations in leaderless databases like Cassandra and DynamoDB. Covers digest comparison, vector clocks, repair probability tuning, and the relationship between read repair and anti-entropy.
How 2PL achieves serializability by splitting every transaction into a lock-growing phase and a lock-shrinking phase. Strict 2PL in practice, how deadlock detection works with real examples, and exactly when MVCC is the better choice.
How blue-green deployment eliminates downtime by maintaining two identical production environments and swapping traffic instantly, with rollback guarantees and database migration strategies.
How canary deployments reduce blast radius by routing a small percentage of production traffic to the new version, with progressive promotion, automated rollback triggers, and metrics-driven confidence.
How to decouple feature releases from code deployments using flags, covering flag types, targeting rules, evaluation architecture, flag debt cleanup, and gradual rollout strategies.
Learn how the Strangler Fig pattern replaces legacy monoliths incrementally, which seams to cut first, and why database migration is harder than the API layer will ever be.
How the anti-corruption layer pattern translates between a legacy system's domain model and your modern domain. Its role in DDD bounded contexts, the types of translation it performs, and when it prevents domain contamination.
Learn how the sidecar pattern decouples cross-cutting concerns from your services, how Envoy intercepts traffic transparently, and when to use it over shared libraries.
How the Backend for Frontend pattern creates purpose-built API layers for each client type, eliminating over-fetching and moving aggregation logic out of the client.
How the ambassador proxy intercepts your service's outbound calls to handle retries, circuit breaking, mTLS, and observability without touching application code. Where it fits, how it differs from a full service mesh, and the real costs.
How pre-signed URLs and scoped credentials give clients direct, time-limited access to resources without routing data through your servers. Covers S3 pre-signed URLs, SAS tokens, scoping, and upload security.
How data mesh shifts data ownership from a central platform team to domain teams, covering domain-oriented ownership, data products, self-serve infrastructure, and federated governance. When it helps and when it adds complexity without value.