What is the role of an API Gateway, and how does the 'Backend for Frontend' (BFF) pattern differ from a generic gateway?

Last updated 3 July 2026

  • An API Gateway is a single entry point that routes requests and handles cross-cutting concerns (auth, rate limiting, TLS, aggregation, caching) while hiding internal topology.

  • A BFF (Backend for Frontend) is one tailored gateway per client type (web, mobile), shaped to that client's payload needs and owned by its frontend team.

  • BFF avoids the compromise of one generic API for all clients. The trade-off is more gateways and some duplicated logic.

  • https://aws.amazon.com/blogs/mobile/backends-for-frontends-pattern/
  • https://docs.cloud.google.com/architecture/hybrid-multicloud-patterns-and-practices/tiered-hybrid-pattern
  • https://www.geeksforgeeks.org/system-design/api-gateway-vs-backend-for-frontend-bff/
  • https://www.geeksforgeeks.org/computer-networks/composition-in-distributed-systems/
  • https://learn.microsoft.com/en-us/azure/architecture/patterns/backends-for-frontends
  • https://www.geeksforgeeks.org/system-design/backend-for-frontend-pattern/
  • https://learn.microsoft.com/en-us/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
  • https://www.freecodecamp.org/news/how-to-navigate-microservices-as-a-frontend-engineer/
All Microservices interview questions