The API gateway

If you imagine microservices as a great orchestra, the gateway API would be the concertmaster. The gateway pattern instruments microservices.

The API gateway is positioned ahead of microservices. Some benefits we get from adopting the API gateway are optimized endpoints and centralized middleware functionality.

Imagine that our application, which uses the microservices architecture, has three different types of clients. The first is a web frontend, the second is a mobile application, and the third is another service external to our application. Each of these clients expects a different response to their respective requests. Without the gateway, each client should know directly the microservices responsible for delivering the ...

Get Microservice Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.