โ† Back to microservices patterns map
Lesson 12 ยท Service Design Patterns

Backends for Frontends (BFF)

Create a tailored backend/API layer per client type such as web, mobile, or TV.

design

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

Per-Client Backends
  ๐Ÿ“ฑ Mobile  โ†’  [BFF-Mobile]  โ†’ lean payload
  ๐ŸŒ Web     โ†’  [BFF-Web]     โ†’ rich payload
  ๐Ÿ“บ TV      โ†’  [BFF-TV]      โ†’ media-optimized
                    โ†“ all call same microservices
                [UserSvc][OrderSvc][ProductSvc]

Tradeoffs

Pros

Optimized per client, less frontend orchestration

Cons

Possible duplication across BFFs

Examples: Netflix, SoundCloud BFF architecture

Comments

Sign in to leave a comment. Your name and photo come from Google; nothing else is shared.

Loading comments...