Microservice Architecture Design Patterns – Decomposition and Integration Patterns (Part 1)
This article introduces key microservice design patterns, covering decomposition approaches such as business‑capability and sub‑domain splits, the Strangler pattern, and integration solutions like API‑gateway, aggregator, and client‑UI composition, while outlining core microservice principles and challenges.
Microservice Architecture Design Patterns
This article aims to help readers understand microservice architecture design patterns to address the challenges of adopting microservices. It is split into two parts: the first part covers decomposition patterns and integration patterns; the second part will discuss database patterns, observability patterns, and cross‑cutting concern patterns.
Core Microservice Principles
Microservices strive for scalability, availability, resilience, autonomy, decentralized governance, fault isolation, automated provisioning, and continuous delivery through DevOps. Applying all these principles introduces a set of challenges that require systematic solutions.
1. Decomposition Patterns
a. Decompose by Business Capability
Services should be loosely coupled and follow the single‑responsibility principle. Breaking an application into smaller services based on business capabilities (e.g., sales, underwriting, claims processing) aligns services with value‑adding functions rather than technical layers.
b. Decompose by Sub‑Domain
When “God classes” appear, Domain‑Driven Design (DDD) helps by introducing sub‑domains and bounded contexts. Each sub‑domain gets its own model and becomes a separate microservice, reducing the risk of monolithic, overly‑large classes.
c. Strangler Pattern
Inspired by a vine wrapping a tree, the Strangler pattern incrementally replaces a monolithic application by extracting domains into independent services, gradually routing traffic to the new services until the original monolith can be retired.
2. Integration Patterns
a. API‑Gateway Pattern
The API gateway acts as a single entry point for all microservice calls, routing requests, abstracting producer details, aggregating responses, providing fine‑grained APIs per client type, handling protocol translation (e.g., AMQP ↔ HTTP), and offloading authentication/authorization responsibilities.
b. Aggregator Pattern
To avoid pushing aggregation logic to consumers, the aggregator pattern either uses a composite microservice that calls required services and merges data, or lets the API gateway split a request, gather data from multiple services, and return a unified response.
c. Client‑UI Composition Pattern
When UI must gather data from many microservices, the UI should be built as a collection of independent components (e.g., Angular, React) where each component calls a single backend service. This enables partial page updates typical of single‑page applications (SPA).
Conclusion
The first part introduced decomposition and integration patterns. The next article will cover database patterns, observability patterns, and cross‑cutting concern patterns, helping readers deepen their understanding of microservice architecture.
360 Tech Engineering
Official tech channel of 360, building the most professional technology aggregation platform for the brand.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.