.NET Architecture & System Design Interview Question #110

What is an API Gateway?

Microservices, API Gateway, Service Communication & Event-Driven Architecture Mid-Level Intermediate

Quick Interview Answer

An API Gateway is an entry point that routes client requests to backend services and can centralize selected edge concerns such as authentication, TLS termination, rate limiting, routing, and response aggregation.

Detailed Explanation

An API Gateway is an entry point that routes client requests to backend services and can centralize selected edge concerns such as authentication, TLS termination, rate limiting, routing, and response aggregation.

A gateway should not become a new monolith containing core business logic. Business rules normally belong in the responsible services, while the gateway focuses on cross-cutting edge responsibilities.

Code Example

Clients
   |
API Gateway
 |    |    |
Orders Billing Users