Microservices, SOA, service-based, and cell architecture
Service styles distribute capabilities across independently running units. They buy isolation and autonomy by accepting networks, distributed data, observability, deployment, and governance complexity.
Core ideas and patterns
| Idea | What it solves | Cost, limit, or warning |
|---|---|---|
| Microservices | Enable independently owned, deployable domain services | Distributed transactions and operations become difficult |
| Service-oriented architecture | Integrates reusable business services across an enterprise | Central governance or ESB can become a bottleneck |
| Service-based architecture | Uses a smaller number of coarse services | Coarse data ownership can constrain autonomy |
| Cell/stamp architecture | Replicates isolated service/data slices | Routing, placement, and fleet management grow |
| Shared-nothing | Minimizes runtime resource sharing | Duplication and eventual reconciliation increase |
| Service mesh | Standardizes transport security and telemetry | It cannot repair bad service semantics |
| API gateway | Centralizes edge routing and cross-cutting policy | Business logic at the gateway creates coupling |
How to apply it
Split by business capability and invariant, not technical layer. Give services data ownership and clear contracts. Budget every remote dependency. Design identity, authorization, discovery, compatibility, delivery, observability, incident ownership, and reconciliation before multiplying services.
Evidence, not opinion
Prove independent deployment, failure isolation, ownership, SLOs, consumer compatibility, and data reconciliation. Compare the operational cost against a modular monolith baseline.
Small example
A tenant cell contains application, cache, queue, and database partitions for a bounded tenant cohort. A bad deployment or hot tenant affects one cell, while the control plane manages placement and rollout.
Feynman check
Explain the design to a new engineer without using the pattern names. State the problem, the forces that conflict, the chosen boundary or mechanism, what can fail, and the evidence that would prove the choice still works.