In microservices architecture each service exposes APIs through which interactions with the service is possible. Clients of application should not be aware about the existence of services or make requests to them directly for various reasons such as the apps internal architecture can change .

Clients should not invoke service APIs directly as

Note that traditional web applications (which respond with html pages to http reqeusts from browser)  have access to services over lan, and are developed in close collbaration with back end teams so could access services directly and performing functionalities of api gateway like api composition.

API gateway pattern

API gateway becomes the single entry point for api requests to application from the outside world and solves the core issues listed above . API gateway is similar to facade pattern of oops. The key functionalities of api gateway are

More about API Gateway