What is an API Gateway?
An API gateway is the gateway to microservices architecture. It's like a bus bar for routing the API to multiple services, without the client having to issue multiple calls. If it helps, you can think of it as a reverse proxy.
Gateways sit between APIs and the application services running on a server. Instead of the APIs sending requests directly to individual services, they go through the gateway.
What's in an API Gateway?
- Access Control manages which APIs can connect to each application service and the rules for how data requests are handled. This ensures that only authenticated user applications can connect to back-end services.
- Rate-Limiting, which reduces the load on APIs to prevent misuse by permitting only a certain number of requests at one time.
- API Monitoring provides the ability to track request and response times. See API analytics for more information.
- Threat Detection.
What are the advantages of an API gateway?
With just one client call, the API gateway can use authentication, security, logging, payment, and load balancing services, usually arranged as Kubernetes or Docker clusters. The API gateway acts as an abstraction layer, tying all of the requisite services together on the backend to provide functionality to the client.
What are the disadvantages of an API gateway?
The API gateway makes the backend pretty complex. Microservices require good engineering design to reduce round trips, decrease latency, and increase API security at public-facing endpoints.
API gateway vs API Management
An API gateway refers to the individual proxy server, while API management refers to the overall solution of managing APIs in production.
Conclusion
An API gateway can provide a great API experience for a client, offering the microservices experience without all the API calls but it must be designed to be scalable, efficient, and secure.
Frequently Asked Questions
What is an API gateway?
An API gateway is a server that sits between client applications and backend services, acting as the entry point to a microservices architecture. It routes a single request to the appropriate services so the client does not have to reach each service directly.
How does an API gateway work?
Instead of clients sending requests directly to individual services, all requests flow through the gateway, which routes each one to the right backend service. It works as an abstraction layer that ties the required services together on the backend.
Why is an API gateway important?
A single client request can leverage shared services such as authentication, security, logging, payment, and load balancing through the gateway. This centralizes common concerns so individual services do not each have to handle them.
What is the difference between an API gateway and API management?
An API gateway refers to the individual proxy server that routes and handles requests. API management refers to the broader solution for managing APIs in production, of which the gateway is one part.
What features does an API gateway provide?
Common features include access control for authentication and authorization, rate limiting to prevent API misuse, API monitoring to track request and response times, and threat detection.
What are the disadvantages of using an API gateway?
An API gateway adds complexity to the backend, since routing every request through a single layer requires careful engineering. Without that care, it can introduce extra latency and additional round trips.


