API Gateway

 ·   1 min read

What is an API Gateway?

An API Gateway is a API management tool that sits between a client and a bunch of backend APIs. Its primary role is to act as a single entry point and standardized process for interactions between an organization’s apps, data and services and internal and external customers.

Advantages of an API Gateway

  • A key benefit of an API gateway is the abstraction of the backend microservices. Clients just programme to the external API contract.
  • Decouples clients from backend. Backend engineers can change the backend microservices and even the architecture without needing the client to change code.
  • API Management
  • Security
  • High availability - If there are failures in the backend services, the API gateway can mask them by returning cached or default data.

What functions does it provide?

  1. Authentication
  2. Rate limiting
  3. Statistics (can be used for monetisation)
  4. API Composition
  5. Request routing
  6. Protocol translation
  7. Custom endpoints based on client
  8. Policies
  9. Alerts
  10. Service discovery
  11. Stabilization and [load balancing]
  12. Caching

Disadvantages of API gateway

  • Slower from a networking perspective as usage of an API Gateway means at least one extra network hop.
  • Extra layer of complexity to manage.
  • Single point of failure so you have to make the API Gateway HA.