Back to Catalog
Microservices
API Design
API Composition
Fan out to multiple services, join results in-memory — no shared DB needed.
Intent & Description
Real-world Use Case
Product detail page that pulls inventory from Service A, pricing from Service B, and reviews from Service C — composer fetches all three and returns one clean response.
Source
📌 TL;DR
Need data from N services? Build a composer, not a mega-service. Fan out, join in-memory, ship it.
Advantages
- No cross-service DB coupling — services stay independent
- Easy to reason about data ownership
- Parallelizable calls = lower latency when done right
- Simple mental model — just an orchestrated fetch
Disadvantages
- In-memory joins can get heavy with large datasets
- Composer becomes a bottleneck / single point of failure if not scaled
- Doesn’t work well for complex filtering or aggregations (use CQRS instead)
- Error handling across multiple calls adds complexity