← Back to microservices patterns mapdesign
🏗️
Microservices Pattern
Backends for Frontends (BFF)
Create a tailored backend/API layer per client type such as web, mobile, or TV.
Detailed Description
Different clients often need different payload shapes, latency budgets, and workflows.
A BFF keeps client-specific aggregation out of core domain services.
Visual Diagram
Mobile -> Mobile BFF -> services Web -> Web BFF -> services TV -> TV BFF -> services
Tradeoffs
Pros
Optimized per client, less frontend orchestration
Cons
Possible duplication across BFFs
Examples: Netflix, SoundCloud BFF architecture