Search

Lessons (40)

  • API Gateway, BFF & Service Discovery

    How clients find the right service among dozens, and how services find each other. API gateways, Backends for …

  • Services & Ingress

    Pods come and go, so how does traffic find them? ClusterIP, NodePort and LoadBalancer Services, cluster DNS, Ingress …

  • Service Communication: Sync vs Async

    Should services call each other directly or talk through events? Compare request/response with messaging, orchestration with choreography …

  • Design a Ride-Sharing Service

    Match riders and drivers with a geo index, safely lease availability, and treat location as a fast-changing …

  • Design a File Storage Service

    Upload bytes directly to object storage while the API owns durable metadata, authorization, sharing and synchronization. ![File storage …

  • Monolith vs Microservices

    … So design team boundaries and service boundaries together: one team owns a few services end to end (the …

  • Finding Service Boundaries with DDD

    … That boundary is a bounded context , and it's the best guide for where to draw service boundaries …

  • Data in Microservices: Sagas & the Outbox Pattern

    Each service owns its database, so how do you keep data consistent across services without a shared transaction …

  • Onion Architecture & Clean vs Hexagonal vs Onion

    … domain model → domain services → application services The Dependency Rule + named layers, use cases as first-class objects, crossing …

  • Deploying & Operating Microservices

    CI/CD per service, blue-green and canary releases, feature flags, API versioning, distributed tracing and the production …

  • Why Kubernetes?

    … one or more containers running together Pods Deployment Keeps N identical pods running; handles rollouts Deployments Service A …

  • Domain-Driven Design: Tactical Patterns

    … Entities, value objects, aggregates and their four rules, repositories, domain services, application services, domain events and factories, all …

  • Layered (N-Tier) Architecture

    … No SQL in controllers; no HTTP in services. 2. Dependencies point down: a layer may use the layer …

  • Architecture Patterns at Scale

    … central services, independently deployed services, event functions and decentralized peers](/img/system-design-l6/architecture-patterns.svg) Style …

  • REST vs GraphQL vs gRPC

    Three popular ways for services to talk. See how each works, compare them side by side, and learn …

  • Serverless Architecture

    … Functions as a Service, event triggers, cold starts, pay-per-use pricing, managed backends, and the patterns and …

  • Kafka vs RabbitMQ & the Kafka Ecosystem

    … Pick what<br/ your team can operate well"] ✅ Kafka shines for: event-driven microservices where many services react …

  • Observability: Logs, Metrics & Traces

    … CPU, memory, queues"] If you only build one dashboard, build this one, per service. Pillar 3: Traces, the …

  • API Contracts, Gateways and Security

    … a gateway applies authentication, authorization, rate limits and routing before services enforce resource-level policy](/img/system-design …

  • Event-Driven Architecture

    … Each service reacts to events and publishes its own. mermaid flowchart LR O[Orders] -- OrderPlaced I[Inventory] I …

  • Resilience Patterns

    … Without it, one slow service causes a cascading failure : mermaid flowchart LR U[👥 Users] -- G[Gateway] -- O[Orders …

  • Docker & Containers

    … many containers, one file Real apps need several services. Compose describes them all in YAML and starts them …

  • Choosing an Architecture

    … Every small change needs 5 services deployed together Distributed monolith; merge services or fix boundaries Business rules scattered …

  • I — Interface Segregation Principle

    … app] FI -- C2[Office app] FI -- C3[Fax service] Change1["Change fax()"] -.breaks.- C1 & C2 & C3 end subgraph …

  • KISS: Keep It Simple, Stupid

    … GW[API Gateway] -- MS1[User service] & MS2[Auth service] & MS3[Profile service] MS1 -- K[(Kafka)] -- MS2 MS3 -- R …

  • Scaling & Health Probes

    … 200); } catch { res.sendStatus(503); } }); mermaid flowchart LR R{"readiness fails"} -- Out["pod removed from Service<br/ (no …

  • React vs Vue vs Angular

    … Shared logic custom hooks composables services Global state Context / stores Pinia injectable services How to choose mermaid flowchart …

  • Vertical Slice Architecture & the Modular Monolith

    … into well-bounded modules that can later become services. Folder structures, rules, and how to enforce boundaries. Part …

  • Design a Reliable Notification System

    … isolation, idempotency, provider failover and auditable states. ![Notification service: preferences feed priority queues, channel providers and idempotent delivery …

  • Releases, Observability and Production Safety

    Ship changes safely with rollout strategy, flags, migration discipline, rollback plans and observable service-level outcomes. ![Safe release …

  • Deployments, ReplicaSets & Rollouts

    … This loose matching is how Deployments find their pods and Services find their endpoints. mermaid flowchart LR D …

  • Networking, DNS and Traffic Routing

    … reverse proxy and load balancer choose a healthy service](/img/system-design-l6/network-routing.svg) The OSI …

  • Message Queues & RabbitMQ

    Queues let services hand off work without waiting. Learn producers, consumers, acknowledgements, exchanges, retries and dead-letter queues …

  • Time, Consistency and Distributed Transactions

    … clocks order observations, fencing protects ownership, and sagas compensate cross-service work](/img/system-design-l6/time-transactions …

  • Consumers & Consumer Groups

    … email-service"] C1[consumer 1] C2[consumer 2] end subgraph G2["Group: analytics"] C3[consumer 1] end P0 …

  • Views, Triggers & Stored Procedures

    … Use triggers for local data rules, not cross-service workflows. Q29 and Q30: Stored procedure versus trigger A …

  • Scaling, Load Balancing & Rate Limiting

    … brief glitches without hammering the service Circuit breaker Stop calling a service that keeps failing; fail fast and …

  • Helm, kubectl Cheat Sheet & Best Practices

    … Helm, the package manager The big idea Installing an app by hand means writing a Deployment, a Service …

  • Debug Latency Like an Investigator

    … through traces, pool wait, database waits and downstream services](/img/system-design-l6/latency-investigation.svg) Symptom Test …

  • Which Pattern Do I Need?

    … middleware, HOCs, retry/cache/log wrappers 4. 🏨 Facade — service layers and SDKs 5. 📰 Observer — events everywhere, UI and …