Using an external API gateway to provide extended flexibility, we will now discuss an approach to calling services and their various techniques, patterns, and use cases. In this chapter, we will explore the topic of building microservices using an API gateway. The reader will become familiar with how an API gateway helps us manage APIs, and also provides a way for an application's clients to interact with microservices.
In a microservice architecture, an application is built with many microservices that are each exposed to a set of typically fine-grained endpoints. However, in a monolithic application, there is only one set of endpoints, with the load balancer distributing the traffic among them. In the case of microservices, we have several sets of endpoints, so we can use an API gateway for client-to-application communication.