Search
Lessons (40)
- Delivery Guarantees: At-Most, At-Least & Exactly Once
… Never twice. - At least once 📦📦: you keep resending until you get a signature. It always arrives, but sometimes …
- A WhatsApp OTP Is Only Single Use If You Make It So
… Store only a hash of it, plus expires at , an attempts counter, and an empty consumed at . ❌ Wrong …
- Payment Retries: Prevent Duplicate Charges
… at most one active payment attempt per order id . - It also helps to base the payment company's …
- Atomic Design & Component Libraries
… Start with small, reusable building blocks and combine them into increasingly complete screens: mermaid flowchart BT A[Atoms …
- The L6 System-Design Thinking Loop
… It is: one seat is sold at most once, and one payment attempt causes at most one charge …
- Design a Ride-Sharing Service
… They both tap "Request ride" at 9:00:00 . Here is what goes wrong, step by step: 1 …
- Month 2: Deep Learning, PyTorch and Transformers (Weeks 5-8)
Build neural networks from scratch, become fluent in PyTorch, turn text into tokens and embeddings, and understand attention …
- Flash Sale: 10 Million Buyers, No Oversell
… Something still has to do "take one only if one is left" atomically, at the durable source of …
- Premiere-Night Video Streaming
Let millions press Play at once by keeping the small 'can I watch?' checks separate from the huge …
- 500 Users Upload Documents at Once: Design the Background Job Pipeline
… Here is what goes wrong at 9:00 a.m., when 500 users upload at once : 1. Every …
- Indexes, EXPLAIN & Query Plans
… WHERE (created at, id) < (:last created at, :last id) ORDER BY created at DESC, id DESC LIMIT 50 …
- Composition over Inheritance
… string) { return ${name} walks along the ground ; } } interface Attack { attack(name: string): string; } class FireBreath implements Attack { attack …
- Zero-Downtime Deploys & Rollbacks
… build into separate release folders, switch with an atomic symlink, run two instances for blue-green releases, handle …
- SOLID at a Glance
Five design principles that keep object-oriented and modular code easy to extend, test and change. One picture …
- AWS Data Pipelines in Plain Language
Move raw data into S3, clean it, catalogue it, and query it without learning every analytics service at …
- Normalization & Denormalization
… After 2NF: Table Key Owns --- --- --- order items order id, product id quantity and price at purchase orders order …
- Go Concurrency: Goroutines, Channels and Context
… If order matters, attach an index to each item and sort at the end. Semaphore: "at most N …
- Next.js Rendering: CSR, SSR, SSG, ISR & Server Components
… You cook at your table. Slow to start eating. - SSR 🍝 Cooked to order : the kitchen cooks your meal …
- Containers at Scale: ECS Deep Dive and EKS
… ip ). - Enforce NetworkPolicies with VPC CNI network policy support or Cilium, and attach security groups for pods when …
- Resilient Service Calls: Retries, Breakers and Load Shedding
… Look at how many users actually succeeded. Check your understanding Four layers each make up to 3 attempts …
- Transformers and Large Language Models
Learn tokens, next-token prediction, attention, pretraining, fine-tuning, context windows, and the limits of language models. The …
- Timeouts, Retries & Backpressure
… How to avoid it: - Limit attempts : e.g. at most 2 retries. - Back off : wait longer after each …
- Releases, Observability and Production Safety
… You have 20 servers, and they get updated a few at a time, so for a while old …
- Caching, Consistent Hashing and Sharding
… All 50,000 reads per second rush to the database at once. The database falls over. 4. Meanwhile …
- L6 Production Debugging Casebook
… cursor contains the last (created at, id) SELECT id, created at, title FROM posts WHERE (created at, id …
- Referrals, Cold Outreach and Tracking Applications
… Would you be comfortable referring me? I've attached my resume and a short summary you can paste …
- Kafka for Backend Services
… The outbox gives you at-least-once publishing and never loses an event. 💡 At larger scale, replace the …
- What Is Software Architecture?
… Learn quality attributes, trade-offs, the main architecture styles, and how to record decisions with ADRs. The big …
- Stacks & Queues
… top arr.pop() O(1) peek() look at top arr.at(-1) O(1) isEmpty() arr.length === 0 …
- Resilience Patterns
… Retrying often helps, but retrying immediately and all at once can finish off a struggling service (a "retry …
- Arrays & Strings
… If you need fast adds and removes at both ends, use a queue or deque (see Stacks & Queues …
- Heaps & Priority Queues
… add at the end, "bubble up" mermaid flowchart LR a["1. Put new item<br/ at the end …
- Debug Latency Like an Investigator
… No trolley free? You wait at the door. Lock wait Time spent waiting because another request is using …
- N+1 Queries, Loading & Pagination
… Cursor pagination says “continue after this stable row.” WHERE (created at, id) < (:last created at, :last id) ORDER …
- Concurrency, Resilience & Distributed Workflows
… Prefer an atomic database statement or a transaction that owns the invariant: sql UPDATE inventory SET available = available …
- Capacity Planning, SLOs and Error Budgets
Turn fuzzy goals like 'it must be fast and reliable at scale' into clear numbers: how much traffic …
- Frontend Security
… Cross-Site Scripting ⭐ An attacker gets their JavaScript to run on your page , so it can steal tokens …
- Event-Driven Patterns, Step Functions and Reliable Lambdas
Build resilient serverless workflows with retries, dead-letter queues, idempotency, fan-out and orchestration. Messages are delivered at …
- Collaborative Document Editing & Real-Time Sync
… If Bob deleted 1 character before Alice's spot, Alice's "insert at 5" becomes "insert at 4 …
- Scaling, Load Balancing & Rate Limiting
… At 2,000 customers you can either: - Give the barista a faster espresso machine → vertical scaling (scale up …