Comparison
API gatewayvsBackend for frontend
API gateway
you put one component in front of all the services to do auth, rate limiting and routing once instead of in each of them.
A single entry point handling cross-cutting concerns — authentication, rate limiting, routing, request logging — for services behind it. It removes duplicated middleware and gives one place to enforce policy. It is also a shared choke point and a place for business logic to accumulate where nobody owns it.
Full entry →Backend for frontend
you build a separate thin API for the mobile app so it stops being shaped by whatever the web client needed.
A per-client aggregation layer that shapes and combines downstream services for one consumer. It lets each client evolve without negotiating with the others and removes chatty round trips on slow networks. The cost is another deployable per client, and duplicated logic if the boundary drifts.
Full entry →