Search
Lessons (32)
- Capacity, Availability, Latency and CAP
… a design chooses latency targets, availability targets and a partition-time consistency policy](/img/system-design-l6/capacity …
- Binary Search
… If capacity C works, every bigger capacity works too, so the condition flips once. Binary search the capacity …
- Storage Engines & Database Operations
… Bound pool size, reserve capacity for critical traffic, set deadlines and investigate long transactions or slow queries. Backups …
- Design a File Storage Service
… part and final checksums Sharing Metadata-owned ACL/capability Device sync Versioned change feed/conflict policy Object-store …
- Design an E-Commerce Checkout
… Handle unknown provider outcomes through reconciliation; expire reservations; isolate checkout capacity from bulk exports and marketing traffic.
- Architecture Patterns at Scale
… Client-server Most products starting out Central service capacity Microservices Independent domain ownership/deployments Distributed operations and contracts …
- Real-Time, Pub/Sub, Webhooks and CDC
… an event stream can feed pub-sub consumers, webhook delivery, server-sent updates and database change capture](/img …
- Arrays & Strings
… mermaid flowchart LR A["capacity 4<br/ ■■■■ full"] -- push → copy to bigger B["capacity 8<br/ ■■■■■□□□"] B -- 3 …
- SQL vs NoSQL Databases
… The CAP theorem : when the network between servers breaks (a P artition), a distributed database must choose between …
- Database Internals, Replication and Scaling
… Replicas increase read capacity but add lag; route read-your-own-write flows carefully. Connection pools bound database …
- Views, Triggers & Stored Procedures
… Transaction-control and return-value capabilities vary by engine, so name the product in an interview.
- Debug Latency Like an Investigator
… Symptom Test first --- --- p50 and p99 rise Broad capacity, network, deploy, or dependency issue. Only p99 rises Queueing …
- Premiere-Night Video Streaming
… every segment does not call auth. - Define degradation: cap bitrate, disable previews, or queue sessions. Heartbeat progress to …
- The L6 System-Design Thinking Loop
… is never charged twice. Peak Average traffic hides capacity limits. 2M checkouts in five minutes. Failure window Finds …
- Pods
… node that has this much free A hard cap at runtime Exceed CPU – The container is throttled (slowed …
- Indexes, EXPLAIN & Query Plans
… reading most of a small table can be cheaper than index random I/O. Operational checklist Capture slow …
- Deploying & Operating Microservices
… Simple, no extra capacity needed; old and new versions run side by side for a while. mermaid flowchart …
- Finding Service Boundaries with DDD
… Practical heuristics for cutting services 1. Follow business capabilities , not technical layers. ✅ "Payments service". ❌ "Database service", "Validation service …
- Dynamic Programming
… subset sum, 0/1 knapsack dp[capacity] or dp[i][capacity] Two strings LCS, edit distance, regex matching …
- I — Interface Segregation Principle
… small, role-based interfaces ts // ✅ One interface per capability interface Printer { print(doc: Document): void; } interface Scanner { scan …
- L — Liskov Substitution Principle
… every caller of Bird.fly() } Fix: model the capability separately. js class Bird { eat() {} } class FlyingBird extends Bird …
- Code Smells & Refactoring
… If not, write a few characterisation tests that capture today's behaviour. 2. Take tiny steps: rename, extract …
- Monolith vs Microservices
… small, independently deployable services , each owning one business capability and its own data , talking over the network. mermaid …
- Deployments, ReplicaSets & Rollouts
… passes), then removes an old one, and repeats. Capacity never drops. ⚠️ Without a readiness probe , Kubernetes sends traffic …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… orders,public.outbox", "topic.prefix": "shop" } } Change Data Capture (CDC) with Debezium reads the database's transaction log …
- Topics, Partitions & Offsets
… same key → same partition → guaranteed order. - Partition count caps consumer parallelism; you can add partitions but it remaps …
- Consumers & Consumer Groups
… independently, each with its own committed offsets . - Partitions cap parallelism; extra consumers sit idle. - Commit after processing for …
- Serverless Architecture
… 0 when nobody uses it Traffic spikes Plan capacity ahead ✅ Scales automatically Ops work Patching, scaling, monitoring hosts …
- Helm, kubectl Cheat Sheet & Best Practices
… true capabilities: { drop: ["ALL"] } Plus: scan images, pull only from trusted registries, use NetworkPolicies, keep Secrets in a …
- Data in Microservices: Sagas & the Outbox Pattern
… twice, so consumers must be idempotent . Change Data Capture (CDC) tools like Debezium read the database's transaction …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… Before the boss fight you save; if you lose, you load the snapshot. Problem: capture an object's …
- Domain-Driven Design: Strategic Design
… Charge card"] -- X1["🩷 Stripe"] -- E3["🟧 Payment captured"] E3 -- E4["🟧 Parcel shipped"] classDef ordering fill: dbeafe …