Quick revision
The short answer
A BFF solves the chattiness and mismatch of clients calling many services directly: it composes several service calls into one response per screen, shapes the payload for that client, and lets the client team change it at its own pace, while a general gateway keeps cross-cutting work like authentication, TLS and rate limiting. Its costs are duplicated logic across BFFs, business rules leaking into them, one more hop and service to run, and fan-out that ties latency to the slowest dependency, so BFFs should stay thin.
What to remember
In this answer, we saw that a BFF composes several service calls into one response per screen, shapes payloads for its client and lets the client team move at its own pace, while a gateway keeps authentication, TLS and rate limiting. We also saw what it costs: duplicated logic, leaked business rules, an extra hop and fan-out latency, which is why BFFs must stay thin.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
A BFF solves the chattiness and mismatch of clients calling many services directly: it composes several service calls into one response per screen, shapes the payload for that client, and lets the client team change it at its own pace, while a general gateway keeps cross-cutting work like authentication, TLS and rate limiting. Its costs are duplicated logic across BFFs, business rules leaking into them, one more hop and service to run, and fan-out that ties latency to the slowest dependency, so BFFs should stay thin.
Why this question is asked
Once an application has more than a handful of services and more than one client, someone has to decide where the data for each screen is put together. Get it wrong and the mobile app makes eight round trips over a slow network, or a shared gateway turns into a tangle of client-specific code that every team is afraid to touch. Interviewers ask about BFFs to see whether we understand both the problem they solve and the new problems they bring. In this answer, we will recap the three options, see how a BFF reduces round trips and shapes payloads, look at ownership and how it splits work with a gateway, and then go through the risks and the rule that keeps BFFs healthy.
1A Quick Recap of the Three Options
Without any middle layer, the client calls each domain service itself. A domain service is a service that owns one business area, such as orders, catalog or loyalty. The home screen of a shopping app might need the user profile, recent orders, recommendations and the loyalty balance, so the app calls four services and assembles the screen on the phone.
A general-purpose API gateway puts one entry point in front of all services. It routes requests, checks tokens and applies limits, but it serves every client the same way. A backend for frontend goes one step further: it is a small server built for one client experience, such as the iOS app or the web site, which calls the domain services and returns exactly what that client's screens need.
- ClientsiOS app, Android app, web site
- API gatewayTLS, authentication, rate limiting, routing
- BFF per experiencecompose calls, shape payloads for screens
- Domain servicesorders, catalog, loyalty, profile: business rules
- Data storeseach service owns its own database
5 layers, from the top down. Step through them one at a time.
The gateway handles what every request needs; the BFF handles what one client needs.
2Fewer Round Trips Per Screen
The first problem a BFF solves is latency from round trips. On a mobile network, each request can easily cost 100 to 300 ms of network time before the server does anything, and a phone may limit how many requests it sends in parallel. Four sequential calls can add a second before the screen is drawn.
With a BFF, the app makes one call, GET /home, and the BFF makes the four service calls in parallel inside the data center, where each hop costs a millisecond or two. The phone pays the expensive network trip once. So the BFF moves the chattiness from the slow link to the fast one, which is why it matters most for mobile clients.
3Payloads Shaped for the Client
The second problem is mismatch. Domain services return complete, general data: an order with 40 fields, prices as minor units, timestamps in UTC. The watch app needs three fields and a formatted string. If the client does the shaping, every client reimplements it and downloads data it throws away.
The BFF selects the fields each screen uses, formats them the way that client displays them, and pages results to suit the screen size, such as 3 recent orders on the watch and 20 on the web. Notice what this protects: the domain services stay general and free of client-specific code. Nobody adds a watchFormattedTotal field to the order service.
4Ownership and the Split With the Gateway
A BFF is usually owned by the team that builds the client. The iOS team can add a field for a new screen and ship it the same day, without asking a central gateway team to schedule the change. That independence is a large part of the value.
The gateway does not disappear. It keeps the concerns that are the same for every request: terminating TLS, validating tokens, rate limiting, request logging and routing to the right BFF. The reason for the split is that cross-cutting concerns need to be consistent and centrally owned, while screen composition needs to change quickly and be owned locally.
5The Problems a BFF Brings
BFFs have real costs. The first is duplication: the iOS and Android BFFs both compute how to show a discounted price, and over time the two versions drift. The second is worse: business rules leak into the BFF. Someone puts an eligibility check in the web BFF because it was quick, and now the rule lives in a place the domain team does not know about.
There is also one more network hop and one more service to deploy, monitor and keep on call. And fan-out changes the latency profile: a screen that calls eight services in parallel is only as fast as the slowest of the eight, so the BFF's tail latency is worse than any single service's.
| Concern | Direct calls | One general gateway | BFF per client |
|---|---|---|---|
| Round trips per screen | Many | Many | One |
| Payload fit | Client trims data | Generic | Shaped for the screen |
| Who changes it | Client team | Central team | Client team |
| Cross-cutting concerns | Every service | Central | Gateway in front |
| Main risk | Chatty, slow on mobile | Bottleneck team | Duplicated logic |
The rule that keeps these costs low is simple: keep BFFs thin. A BFF does composition and presentation only. Any decision about money, eligibility or state belongs in a domain service, and the BFF calls it. If two BFFs need the same logic, that is a signal the logic belongs in a domain service, not that it should be copied.
6Follow-up questions
How is a BFF different from GraphQL?
GraphQL lets the client ask for exactly the fields it needs from one schema, which solves the payload-fit and round-trip problems in a different way: the client writes the query instead of a team writing a BFF endpoint. Many companies use a GraphQL server as their BFF. The trade-off moves to schema design and query cost control, while the risk of business logic leaking into resolvers is the same.
Should the iOS and Android apps share one BFF?
Often yes. If the two apps show the same screens with the same data, two BFFs mean duplicated work for no benefit. Separate BFFs make sense when the experiences genuinely differ, such as a TV app or a partner portal, or when different teams with different release cycles own them.
What happens to the BFF when a domain service is slow?
The BFF waits for it unless we design otherwise. A good BFF gives each call a timeout from the screen's budget and returns a partial screen when a non-essential section, such as recommendations, does not answer in time, so one slow service does not make the whole screen slow.
7Conclusion
In this answer, we saw that a BFF composes several service calls into one response per screen, shapes payloads for its client and lets the client team move at its own pace, while a gateway keeps authentication, TLS and rate limiting. We also saw what it costs: duplicated logic, leaked business rules, an extra hop and fan-out latency, which is why BFFs must stay thin.
Open with
A BFF is a small server built for one client experience, like the iOS app, that sits between the client and the domain services. It solves three problems.
Then, if they want more
First, round trips: instead of the phone calling four services over a slow mobile network, it makes one call, and the BFF fans out in parallel inside the data center where each hop costs a millisecond or two.
Second, payload shape: domain services return general data, and the BFF picks the fields, formats and page sizes that the screen needs, which keeps client-specific code out of the domain services. Third, ownership: the client team usually owns its BFF, so it can ship screen changes without waiting on a central team.
A general gateway still sits in front for TLS, authentication, rate limiting and routing, because those must be consistent. The costs are real though.
Logic gets duplicated across BFFs and drifts, business rules like pricing or eligibility leak into them, there is one more hop and service to operate, and fan-out means the screen is only as fast as the slowest dependency.
So my rule is to keep BFFs thin: composition and presentation only, with every business decision in a domain service, and per-call timeouts with partial responses for non-essential sections.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "What problems does a BFF solve compared with clients calling services directly or one...": https://scrivio-interview-library.netlify.app/architecture/api-design-at-scale/e7e82dd317/