Which is a typical responsibility of an API gateway?
Options
- Running database migrations on every deployment
- One entry point: routing, auth, rate limiting, TLS (Correct option)
- Storing the data of the users of the app
- Compiling the frontend assets for the browser
Answer
A single entry point handling routing, auth, rate limiting, TLS termination and request aggregation
Why
With many backend services, clients would need to know every address and every service would repeat auth and rate limiting.
An API gateway sits in front: clients call one address, and the gateway checks authentication, applies rate limits, terminates HTTPS and routes each request to the right service.
Keep business logic out of it, or it becomes a bottleneck.
Remember
API gateway = one front door for many services.