Search

Lessons (24)

  • Delivery Guarantees: At-Most, At-Least & Exactly Once

    Can a message be lost? Delivered twice? Learn Kafka's three delivery semantics, idempotent producers, transactions for read …

  • Design a Reliable Notification System

    Deliver email, SMS, push and in-app messages with preferences, isolation, idempotency, provider failover and auditable states. ![Notification …

  • REST API Design

    … resource naming, methods, status codes, pagination, versioning, errors and idempotency. The big idea A good API is like …

  • Exactly-Once Payment Processing

    Safe payment retries need a durable idempotency record, atomic state transition and provider-side deduplication. The invariant For …

  • Design an E-Commerce Checkout

    … inventory reservation, idempotent payment, order creation and durable events. ![Checkout: catalog/search are read paths while inventory, payment …

  • Kafka Producers

    … batching, compression, partitioning, the acks setting that trades speed for safety, retries, and the idempotent producer. The big …

  • API Contracts, Gateways and Security

    Make APIs evolvable and safe with explicit formats, versioning, idempotency, gateway policy, authentication and authorization. ![API boundary: a …

  • Real-Time, Pub/Sub, Webhooks and CDC

    Choose the right push or event mechanism and keep event delivery observable, idempotent and replayable. ![Event patterns: an …

  • Message Queues & RabbitMQ

    … processing the same message twice must be harmless. js // Idempotent consumer: remember processed message IDs if (await db …

  • Timeouts, Retries & Backpressure

    … with idempotency key. Safety margin 150 ms Return before caller gives up. Retry only transient, idempotent work while …

  • Consumers & Consumer Groups

    … process, then commit, and make processing idempotent so a repeat does no harm. js const consumer = kafka.consumer …

  • Design a Chat Application

    … A client idempotency key makes reconnect/retry safe. Order messages by conversation key, not globally. Presence is temporary …

  • How a Web Request Works

    … 49.99 } HTTP methods Method Meaning Safe? Idempotent? --- --- --- --- GET Read ✅ ✅ POST Create / action ❌ ❌ PUT Replace ❌ ✅ PATCH Partial update …

  • Batch vs Stream and Data Modeling

    … stay in sync Streams need an ordering key, idempotency, retention and DLQ. Batch jobs need isolation so reporting …

  • Data in Microservices: Sagas & the Outbox Pattern

    … event is published twice, so consumers must be idempotent . Change Data Capture (CDC) tools like Debezium read the …

  • System Design Interview Framework

    … 5. Define APIs with authorization and idempotency. 6. Deep dive into the hard invariant/bottleneck. 7. Close with …

  • Service Communication: Sync vs Async

    … 1 }] } } 💡 Give every event an ID (for idempotency), a type , a version (for schema evolution) and a timestamp …

  • Flash Sale: 10 Million Buyers, No Oversell

    … Give every purchase an idempotency key, reconcile reservations/orders/payments, and isolate sale traffic from browsing and recommendations.

  • Resilience Patterns

    … They'll fail again. - ⚠️ Only retry idempotent operations, or use idempotency keys (see REST API Design ). - Limit retries …

  • ACID, Transactions & Locks

    … Retry only the aborted transaction with bounded backoff and idempotency. Keep transactions short, access tables in a consistent …

  • Serverless Architecture

    … great for spiky workloads. - Design functions to be stateless, small, idempotent and least-privileged; use queues for resilience …

  • Event-Driven Architecture

    … in the ubiquitous language Unique eventId Consumers deduplicate (idempotency) version + a schema Evolve safely; old consumers keep working …

  • Hash Maps & Sets

    … Deduplication : "have we processed this event ID before?" (idempotency) - Counting : word frequency, rate limiting per user - Routing : URL …

  • Monolith vs Microservices

    … that becomes a network call needs timeouts, retries, idempotency, authentication, monitoring and versioning. The middle path: the modular …