Search
Lessons (24)
- Exactly-Once Payment Processing
Safe payment retries need a durable idempotency record, atomic state transition and provider-side deduplication. The invariant For …
- Design a Reliable Notification System
Deliver email, SMS, push and in-app messages with preferences, isolation, idempotency, provider failover and auditable states. ![Notification …
- The L6 System-Design Thinking Loop
… Provider charge succeeds, app crashes before saving. Recovery Retries need evidence, not guesses. Look up the provider with …
- Design an E-Commerce Checkout
… Handle unknown provider outcomes through reconciliation; expire reservations; isolate checkout capacity from bulk exports and marketing traffic.
- React Hooks in Practice
… theme, setTheme] = useState("dark"); return ( <ThemeContext.Provider value={theme} <Page / </ThemeContext.Provider ); } function Button() { const theme = useContext(ThemeContext …
- Storage Engines & Database Operations
… a bounded pool protects the primary while WAL, backups and replicas provide recoverability](/img/database/storage-operations.svg …
- Serverless Architecture
… automatically Ops work Patching, scaling, monitoring hosts ✅ The provider handles it Cost at constant high load ✅ Often cheaper …
- Observability: Logs, Metrics & Traces
… 4999, provider: "stripe", traceId, err }, "Payment failed", ); json {"level":"error","time":"2026-09-28T03:12:45.120Z","event …
- Hexagonal Architecture (Ports & Adapters)
… secondary) side Things the application calls Database, payment provider, email, event bus, clock mermaid flowchart LR subgraph Driving …
- Which Pattern Do I Need?
… B[Builder] P3["Need matching families<br/ (themes, providers)"] -- AF[Abstract Factory] P4["3rd-party API doesn't …
- D — Dependency Inversion Principle
High-level business logic should depend on abstractions, not on concrete details like databases or email providers. The …
- Comments & Formatting
… js // We retry 3 times because the payment provider returns // random 503s during their nightly maintenance (02:00 …
- Clean Architecture
… The database, web framework and email provider plug in from outside and can be replaced. ![The Clean Architecture …
- Kubernetes Cluster Architecture
… staff?" cloud-controller-manager Talks to the cloud provider: load balancers, disks, node lifecycle Facilities team dealing with …
- Pods
… IP across the cluster (the flat pod network, provided by the CNI plugin). Multi-container patterns Sidecar A …
- State Management (Redux, Zustand, TanStack Query)
… state.items.filter((i) = i.id !== id) })), clear: () = set({ items: [] }), })); // Any component, no Provider needed. Select only what …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… integrates databases and data stores without code; Debezium provides CDC. - Kafka Streams / Flink process streams in real time …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
… The moment you write to an external system (a database, an email API, a payment provider), Kafka can …
- API Gateway, BFF & Service Discovery
… services find each other as instances change; Kubernetes provides it through Services and DNS. - A service mesh moves …
- REST API Design
… key }); // pass it to the provider too await idempotency.complete(key, 201, payment); res.status(201).json(payment …
- Creational Patterns: How to Make Objects
… products come in families (themes, database drivers, cloud providers: AWS vs GCP). --- 3. Builder 🍔 Analogy: At a burger …
- Authentication, Authorization & API Security
… defaults, config review SSRF API fetches a user-provided URL → hits internal services Allow-list destinations js // ❌ SQL …
- Caching & Redis
… miss Cleaner app code Needs a cache library/provider that supports it Write-through Write to cache and …
- Structural Patterns: How to Connect Objects
… integrating legacy code, 3rd-party SDKs, or switching providers (Stripe → PayPal) behind a stable interface. --- 2. Decorator ☕ Analogy …