IntermediateGraphQL & API GatewayAPI gatewayBFFRate limiting
API Gateway Patterns — Vocabulary
5 exercises — Learn API gateway vocabulary: BFF, rate limiting, circuit breaking, request transformation, and API versioning.
0 / 5 completed
1 / 5
An API gateway typically handles which cross-cutting concern?
An API gateway centralises concerns that every service needs: auth token validation, rate limiting, SSL termination, request/response transformation, routing. This avoids duplicating these concerns in every microservice.
2 / 5
Your mobile team wants a BFF (Backend for Frontend). What is this pattern?
BFF creates a separate API gateway for each client type. The mobile BFF returns mobile-optimised payloads; the web BFF returns richer data. This avoids one generic API trying to serve all clients, which leads to over-fetching or under-fetching.
3 / 5
A gateway implements rate limiting of 100 requests per minute. If a client exceeds this, the gateway:
Rate limiting returns HTTP 429 (Too Many Requests) when a client exceeds the configured limit. The response typically includes a Retry-After header. This protects backend services from being overwhelmed by a single client.
4 / 5
The gateway uses a circuit breaker to:
A circuit breaker in the gateway opens when a downstream service's error rate exceeds a threshold — requests immediately fail fast with an error instead of waiting for timeouts. This prevents a single failing service from causing gateway overload.
5 / 5
Fill in the blank: "We route /v1/ to the old backend and /v2/ to the new backend — the gateway handles ___."
API versioning at the gateway lets you run multiple API versions simultaneously — old clients hit /v1/ (routed to the old backend), new clients hit /v2/ (new backend). This enables zero-downtime migrations without forcing all clients to upgrade simultaneously.