Gateway defined as the management tool that manages the services between a site and the backend service. The basic gateway may consist of the following components as shown below figure.
Why we need API gateway ?
API gateway increase the usability of request call in an efficient way, it helps the client to make a request to the server which reduce the throughput time. Using a gateway can help a developer to manage the services that make it easier to create, publish, maintain, analyze, secure, and refine APIs at any time. As shown in the above figure, client apps request service to API Gateway, to checks the client's credential, if it is an authorized client then it will be authenticated and proceed otherwise denied the requests. API Gateway keeps the records of all requests/responses in log files. API sends the request to the backend system for their service based on the requirements of the client apps, the backend system response to the API Gateway and it send back to the client apps as a response.