API gateway pattern
One service-facing endpoint clients talk to; it routes to whichever internal service handles the request. Gives you one place to do auth, rate limiting, tracing, response shaping, versioning. Cost: it's a SPOF if not made HA, and it can drift into a god-object that knows about every backing service.
One service-facing endpoint clients talk to; it routes to whichever internal service handles the request. Gives you one place to do auth, rate limiting, tracing, response shaping, versioning. Cost: it's a SPOF if not made HA, and it can drift into a god-object that knows about every backing service.
symptoms
- clients have to know about every backend service
- cross-cutting concerns scattered across services
- API versioning that propagates to every internal service
causes
- microservice sprawl exposed to clients directly
- no edge layer
fixes
- gateway with auth, rate limit, tracing, request shaping
- one team owns the gateway
- BFF for distinct client types
you might say
- put it behind the gateway
- gateway pattern
- edge service