Backend Fundamentals · Designing APIs
API gateways
An API gateway is one front door for many services. It routes each call, checks tokens and rate limits once, and can combine several calls into one. Keep it thin and redundant, or it becomes the bottleneck.
- Time25 min
- LevelDeveloper
- Experiments1 live
- Check6 questions






TLS the gateway decrypts with the certificate for api.shop.example.
Rate limit this client is under its quota for the minute.
Compose /home means three inner calls, sent at the same moment.
Services user, order and offers services answer in 20 to 35 ms.
Merge the gateway shapes one JSON response for the home screen.
Record status, timing and request id go to logs and metrics.
CDN or edge (optional) caches public responses near users.
Service mesh (optional) proxies beside services for calls between them.
Databases reached only by the service that owns each one.