Microservices Architecture

Overview

Microservices architecture structures a system as a set of small, independently deployable services. Each service owns a focused business capability, such as payments, catalog, or notifications.

Core Characteristics

flowchart LR C[Client] --> G[API Gateway] G --> U[User Service] G --> O[Order Service] G --> P[Payment Service] U --> UDB[(User DB)] O --> ODB[(Order DB)] P --> PDB[(Payment DB)]

Production Example

An e-commerce platform typically separates customer, checkout, and payment concerns.

services: user-service: image: company/user-service:2.4.1 order-service: image: company/order-service:3.1.0 payment-service: image: company/payment-service:1.8.3

When a payment bug appears, only the payment service requires rollback.

Operational Practices

Common Pitfalls

Key Takeaways