Microservices Architecture Patterns
The handful of patterns that show up again and again when you build distributed systems — and when to reach for each.
March 28, 2026 · 1 min read
Microservices sold a story about independent teams shipping independently. That works — but only if you pick the right patterns for the seams between services.
API Gateway
A single entry point that handles authentication, rate limiting, and routing. Clients talk to one URL; the gateway fans out internally. Keeps client code simple and lets you evolve the backend shape without breaking apps.
Saga
Long-running transactions across services can't use a database transaction. A saga breaks them into local steps, each with a compensating action if a later step fails. Choreography (events) for simple flows, orchestration (a coordinator) when the flow gets branchy.
Circuit Breaker
When a downstream service degrades, don't keep hammering it. A circuit breaker trips after repeated failures, returns fast for a cool-down window, then probes cautiously. Keeps a slow service from taking down its callers.
Outbox
Writing to the database and publishing an event needs to be atomic — otherwise you lose events or double-publish. Write the event into an outbox table in the same transaction as your domain change; a separate relay process ships it to the broker.
These four cover a huge chunk of real-world problems. Reach for them deliberately, not by default.