backend for frontend pattern
Web client and mobile client want different shapes of the same data. Build a separate gateway for each, each owned by the team that owns the client. Avoids one mega-gateway trying to please everyone.
Web client and mobile client want different shapes of the same data. Build a separate gateway for each, each owned by the team that owns the client. Avoids one mega-gateway trying to please everyone.
symptoms
- mobile and web fighting over response shapes
- over-fetching on mobile
- gateway team becomes a bottleneck
causes
- one shared gateway serving all clients
- no clear ownership of the request shape per client
fixes
- separate BFF per client type
- each owned by its consuming team
- shared utilities, not shared shape
you might say
- BFF
- mobile BFF
- web BFF