Skip to content

Latest commit

Β 

History

History
83 lines (59 loc) Β· 1.43 KB

File metadata and controls

83 lines (59 loc) Β· 1.43 KB

Microservices Patterns

A curated collection of Microservices Architecture Patterns, best practices, architecture diagrams, trade-offs, and interview questions.


🎯 Purpose

This repository serves as a practical reference for software engineers, solution architects, and technical leads who design and build distributed systems.

Each pattern includes:

  • βœ… Problem Statement
  • βœ… Solution
  • βœ… Architecture Diagram
  • βœ… Advantages & Disadvantages
  • βœ… Trade-offs
  • βœ… When to Use
  • βœ… When NOT to Use
  • βœ… Common Mistakes
  • βœ… Spring Boot Code Snippets
  • βœ… Interview Questions

Repository Structure

β”œβ”€β”€ decomposition/
β”œβ”€β”€ communication/
β”œβ”€β”€ data/
β”œβ”€β”€ resilience/
β”œβ”€β”€ deployment/
β”œβ”€β”€ modernization/
β”œβ”€β”€ diagrams

Patterns

Decomposition

  • Decompose By Business Capability
  • Decompose By Subdomain

Communication

  • API Gateway
  • API Composition
  • Service Discovery
  • Messaging
  • Backend For Frontend

Data

  • Database Per Service
  • Saga
  • Saga - Choreography
  • Saga – Orchestration
  • Shared Database (anti-pattern)
  • Transactional Outbox Pattern
  • CQRS

Resilience

  • Circuit Breaker
  • Retry
  • Bulkhead

Deployment

  • Sidecar

Modernization

  • Strangler Fig
  • Anti Corruption

Observability (Under-documented)

Contributing

Contributions are welcome!

If you'd like to improve documentation, diagrams, or examples, feel free to open a Pull Request.