Course contentsShow
← System Design
Lesson 907 of 1,91923. API Gateway PatternFree lesson

BFF Anti-Patterns and Pitfalls

Avoiding BFFs becoming bloated with business logic, duplicating backend functionality, or creating tight coupling between layers.

BFF Anti-Patterns and Pitfalls

What you'll learn: How to prevent Backend-for-Frontend (BFF) services from becoming problematic by avoiding common design mistakes that undermine their purpose.

The Core Problem

While BFFs should act as thin translation layers between clients and backends, they often accumulate responsibilities that belong elsewhere. Think of a BFF like a diplomatic translator at a conference—they should translate languages, not make policy decisions or negotiate treaties themselves.

Common Anti-Patterns

Business Logic Creep
When you start adding validation rules, complex calculations, or workflow orchestration directly in the BFF, you're duplicating logic that should live in backend services. Each BFF team shouldn't reimplement the same order validation rules—that belongs in the Order Service.

Backend Duplication
Creating mini-versions of backend functionality in your BFF defeats the purpose. If your Mobile BFF contains its own product pricing algorithm because "the backend is slow," you've created a maintenance nightmare where business rules exist in multiple places.

Tight Coupling
Making BFFs directly mirror backend service structures creates fragile dependencies. When the backend changes its API, every BFF breaks. Similarly, letting backend teams dictate BFF structure violates the pattern's client-focused purpose.

What BFFs Should Do

BFFs should focus on:

  • Aggregating multiple backend calls
  • Reshaping response data for client needs
  • Handling client-specific authentication flows
  • Translating protocols (GraphQL to REST, etc.)

They should not contain business rules, data validation logic, or reimplementations of backend capabilities.

Key Takeaway: Keep BFFs thin and focused on client presentation concerns—any business logic, complex validation, or data processing belongs in your backend services where it can be properly maintained and reused across all clients.