QamoosTech
Web & APIsAPI designIntermediate

API Gateway

PronunciationAY-PEE GAYT-way

Definition

An API Gateway is a server that acts as a single entry point for a system, routing incoming requests to the appropriate microservices. It handles cross-cutting concerns like authentication, rate limiting, and logging before forwarding the request.

Where you hear it

In system architecture meetings, backend infrastructure discussions, and when designing microservices.

Examples

  • We need to configure the API Gateway to route traffic to the new user service.
  • The API Gateway handles all authentication checks so our microservices don't have to.
  • The gateway checks the API key once, then forwards the request to the orders service.

Common mistake

Confusing an API Gateway with a Load Balancer; while a Load Balancer distributes traffic to identical instances, an API Gateway routes requests to different services based on logic or path.

Don't confuse with

API Gateway vs Reverse Proxy; while a reverse proxy typically handles load balancing and security for a single backend or group of servers, an API Gateway provides additional features like request transformation, protocol translation, and complex routing for microservices.

Say it at work

  • In a meeting or chatLet's check if the API Gateway is correctly forwarding the headers to our internal services.
  • In an email or ticketI have updated the API Gateway configuration to include the new endpoint for the payment service.