This content originally appeared on Level Up Coding - Medium and was authored by Dylan Oh
The simplest form of API can be just receiving a request, and sending back a response. However, things usually get complex in real life when you are managing a bunch of APIs and you might need to perform some actions before the requests reach the backend API services, i.e., authentication and authorization.
API Gateway is a middleware you hit before reaching the APIs server. It acts as a reverse proxy between the client (could be any frontend applications), and the backend services. There are quite a number of service providers for API Gateway services, including AWS (Amazon Web Services), Microsoft Azure, and Google Cloud Platform.
Here are some of the use cases and the benefits that API Gateway provides:
1) Authentication and authorization service
- You may use an API Gateway to manage and control access to certain endpoints. The gateway can also be used to whitelist or deny some specific source IP addresses for your backend services. This is an example of implementing authentication and authorization with AWS API Gateway: API Gateway Resource Policy Examples.
2) Rate-limiting for your APIs
- The API Gateway can also be used to prevent DDoS (denial-of-service) attack, which is a malicious action that can be done to disrupt the network traffic and causes the unavailability of service to the clients. In order to arrest this, you may put a limit on how many requests per second from the same source IP address that can be accepted in the policy of API Gateway. You may also learn about how to use Oracle API Gateway for this purpose: Limiting the Number of Requests to API Gateway Back Ends
3) Analytics, logging, and reporting
- API Gateway is useful to keep track and monitor all the traffics between the clients and the backend services, as this is the single entry point. This is crucial to debug and troubleshoot the issues when multi-point failures occur. The following example demonstrates how to monitor your APIs with Google Cloud API Gateway: Monitoring your API.
4) Connect to other services
- One common use case is that you might want to connect to a billing service when monetizing your API services. AWS is providing a great functionality of API Gateway to control third-party usage of your APIs, and even the packaging of the APIs into different paying tiers. You can check out this article on how AWS API Gateway helps you to achieve monetization of your API services: Monetize your APIs in AWS Marketplace using API Gateway.
In a nutshell, API Gateway is a tool that helps you to build robust and scalable APIs. It assists in managing complex systems and provides a single point of entry to them.
Do follow me for future articles on programming, developer productivity, and more topics! Cheers.
The usage of an API Gateway was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Dylan Oh

Dylan Oh | Sciencx (2022-09-06T11:42:38+00:00) The usage of an API Gateway. Retrieved from https://www.scien.cx/2022/09/06/the-usage-of-an-api-gateway/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.