Microservices Patterns - Complete Internal Map

// Decomposition · communication · data · reliability · observability · security · deployment · transactions

46 total patterns
Decomposition
Communication
Data
Reliability
Transactions
01Decomposition Patterns- How to split a system into microservices
02Communication Patterns- How services talk to each other
↩️Synchronous REST / gRPCsync
Direct request-response communication where the caller waits for a downstream service.
Service A -> HTTP/gRPC -> Service B Service A waits for response Failure in B affects A
e.g.: Express REST, gRPC with Protobuf, GraphQL
📨Asynchronous Messagingasync
Services communicate through a broker so producers and consumers can scale independently.
Producer -> Broker topic/queue Consumer A pulls Consumer B pulls Producer does not wait
e.g.: Kafka, RabbitMQ, SQS, NATS
🔔Event-Driven Communicationevents
Services publish domain events when important business facts happen.
OrderService emits OrderPlaced EmailService reacts InventoryService reacts AnalyticsService reacts
e.g.: Kafka events, EventBridge, Node EventEmitter
🌐API Gateway Patterngateway
A single entry point routes, authenticates, rate-limits, and protects backend services.
Client -> API Gateway -> auth -> rate limit -> route to service
e.g.: Kong, AWS API Gateway, Nginx, Traefik
🔍Service Discoverydiscovery
Services register and discover dynamic endpoints instead of hardcoding hostnames or IPs.
Service starts -> registry Client asks registry Registry returns healthy endpoints
e.g.: Consul, Kubernetes DNS, Eureka
🛰️Microservices Communication Deep Divecommunication
Interactive deep dive on service discovery, load balancing, resilience, and live communication behavior.
Client -> Discovery -> Load Balancer -> Service Instance Failures -> Retry / Circuit Breaker Health checks -> dynamic routing
e.g.: Service discovery + round robin + circuit breaker simulation
03Service Design Patterns- How individual services are structured internally
04Data Patterns- How services manage and share data
05Reliability Patterns- Keep services resilient under failure
06Observability Patterns- See what happens inside distributed services
07Security Patterns- Secure service-to-service and client-to-service communication
08Deployment Patterns- How microservices are deployed and released safely
🔵🟢Blue-Green Deploymentdeploy
Run two identical environments and switch traffic after the new one passes checks.
Blue = live v1 Green = deploy v2 Test green Switch traffic to green Blue becomes rollback
e.g.: AWS CodeDeploy, Kubernetes service switching
🐦Canary Deploymentdeploy
Release to a small percentage of traffic, monitor, then gradually increase.
5% -> v2 canary 95% -> v1 stable Monitor errors/latency Increase or rollback
e.g.: Argo Rollouts, Flagger, Spinnaker, Istio weights
🔄Rolling Updatedeploy
Replace old instances with new instances gradually.
[v1][v1][v1] -> [v2][v1][v1] -> [v2][v2][v1] -> [v2][v2][v2]
e.g.: Kubernetes Deployment default rollout
👻Shadow / Mirror Deploymentdeploy
Mirror production traffic to a new version, but discard shadow responses.
User traffic -> v1 live Mirror same request -> v2 shadow Discard shadow response Compare logs/metrics
e.g.: NGINX mirror module, Envoy traffic shadowing, Istio mirror
💥Recreate Deploymentdeploy
Stop old version first, then start the new version.
Stop v1 Downtime window Start v2 Serve traffic again
e.g.: Kubernetes strategy: Recreate, controlled maintenance windows
⚖️A/B Testing Rolloutexperiment
Route different user segments to different versions to compare outcomes.
Segment users by rule Group A -> version A Group B -> version B Compare conversion and engagement
e.g.: LaunchDarkly, Statsig, Optimizely, custom feature-flag routers
🏗️Immutable Infrastructuredeploy
Never patch running instances; build a new image and replace them.
Bad: patch live server Good: build image v2 Deploy replacement Terminate old
e.g.: Docker, Kubernetes, Packer AMIs, GitOps with ArgoCD
🎯Deployment Interview Cardinterview
Layer-level interview focus across deployment strategies.
Q: Blue-Green vs Canary - when to choose each? A: Blue-Green for instant rollback and strict cutover. A: Canary for gradual risk control with live metrics.
Tip: mention rollback speed, observability, and infra cost tradeoffs.
09Distributed Transaction Patterns- How to maintain data consistency across services
Production microservices use patterns from many categories together: boundaries, communication, data ownership, failure handling, observability, security, release safety, and consistency all matter.