What is the "Backend-for-Frontend" (BFF) pattern, and what problem does it solve for mobile vs. web clients?
Last updated
Backend-for-Frontend (BFF): a separate dedicated backend per client type (iOS, Android, web). Each one aggregates downstream microservice calls and shapes responses for its client.
It solves a one-size-fits-all API problem: mobile clients over-fetch or make many round trips, and a shared API bloats trying to serve every client.
Benefits: optimized payloads and independent evolution by frontend teams. The cost is more services and possible duplicated logic, so keep shared logic in downstream services.
- https://www.geeksforgeeks.org/system-design/top-microservices-interview-questions/
- https://www.geeksforgeeks.org/system-design/microservices-resilience-patterns/
- https://medium.com/@RichaShukla2111/saga-pattern-a-practical-guide-to-distributed-transactions-in-microservices-f4f0f27755f0
- https://dev.to/athulmr/making-rest-microservices-resilient-bulkhead-retry-circuit-breaker-in-practice-1mpl
- https://blog.bytebytego.com/p/6-more-microservices-interview-questions