Architecturechapter 2 of 5 · 3 lessons
API Gateway
Single entry point for all client traffic. Auth, routing, rate limiting, and aggregation in one layer.
Once you have more than one backend service, somebody has to answer the question every client asks: where do I send this? An API gateway is that answer, one entry point that authenticates, routes, throttles and shapes traffic before any backend sees it.
Done well, it stops twenty services each reimplementing the same auth middleware. Done badly, it becomes a slow political bottleneck every team is afraid to touch. Which one you get is decided early, by what you allow into it.
Lessons
3 in this chapter- The Front DoorOne address for clients, one routing table for the platform team.2 min
- Cross-Cutting Concerns, Done OnceAuth, rate limits, and logging written one time instead of once per service.2 min
- Gateway vs Load Balancer vs BFFThree boxes that all sit in front of servers and do three different jobs.3 min