Recipe
Microservices Patterns
Proven decomposition strategies, communication topologies, and resilience primitives for distributed systems at scale.
Decomposition
- Domain-driven — align service boundaries with bounded contexts from the domain model.
- Strangler Fig — incrementally replace monolith functionality with new services behind a routing layer.
- Sidecar — co-locate cross-cutting concerns (logging, proxy, config) alongside the primary service container.
Communication
- Sync RPC / REST — request-response for commands that require immediate consistency.
- Async messaging — event-driven choreography via durable queues for eventual consistency.
- CQRS — separate read and write models; project events into optimized query views.
Resilience
- Circuit breaker — fail fast when a downstream dependency exceeds a failure threshold.
- Bulkhead — isolate thread pools or connection pools per downstream to contain cascading failures.
- Retry with backoff — exponential jittered retries for transient faults; idempotency keys required.
Meridian tip: Start with a modular monolith. Extract services only when the team, data, and deployment cadence demand independent scaling.