Skip to content

2.3. API Gateway and Service Contracts

The gateway is the single front door through which all external traffic enters — and therefore the single place to enforce authentication, routing, rate limits, and request shaping without duplicating that logic in every service. It is also a potential single point of failure and a latency tax on every call. This chapter covers the gateway and Backend-for-Frontend patterns, contract-first development with OpenAPI, and the idempotency guarantees that make retries safe.