Interview concept

What is an API gateway?

An API gateway sits in front of backend services as a single entry point, routing requests and centralizing cross-cutting concerns like authentication, rate limiting, caching, and response aggregation.

Interview concept

How it works

Routing

It maps incoming paths to the right backend service and can aggregate several calls into one response.

Cross-cutting concerns

Authentication, rate limiting, TLS termination, and logging all live in one place.

Tradeoffs

It simplifies clients but can become a bottleneck or single point of failure if it is not scaled.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

What is the difference between an API gateway and a load balancer?

A load balancer spreads traffic across identical servers; a gateway also routes by API, aggregates calls, and enforces policy.

Does an API gateway add latency?

It adds a network hop, but centralized caching and connection reuse often offset the cost.