What is the difference between an API Gateway aggregating requests and a service directly calling multiple downstream services?
Last updated
Gateway aggregation happens at the edge for client convenience: it combines responses into one call to cut chattiness and should stay thin, with no business logic.
Service-to-service calls are internal business orchestration: a domain service owns the workflow and enforces rules, sagas, and consistency.
Putting business logic in the gateway turns it into a bloated, coupled bottleneck. Gateway = composition, service = business capability.
- https://learn.microsoft.com/en-us/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
- https://www.geeksforgeeks.org/system-design/api-gateway-patterns-in-microservices/
- https://www.freecodecamp.org/news/how-to-build-microservices-based-rest-apis-for-healthcare-portals/
- https://dev.to/sanukhandev/api-gateway-the-bouncer-your-microservices-didnt-know-they-needed-1j0e