Scrivio Interview library
DesignIntermediate6 min read · updated 12 November 2026

A mobile home screen needs data from the profile, orders, recommendations and loyalty services. Compare client-side calls, API composition in a gateway or BFF, and a precomputed read model.

Client-side calls let the app talk to four services directly, which is chatty over mobile networks and exposes internal services. A gateway or backend-for-frontend (BFF) calls the services in parallel and returns one response, but it needs timeouts and partial results. A precomputed read model built from events answers fastest and survives outages, but it is eventually consistent and more work to build. In every option we return partial content when a non-critical part such as recommendations fails, and we choose by latency needs, how often the data changes and who owns what.

Why this question is asked

A home screen is often the busiest endpoint in a mobile product: every user opens it several times a day, and its speed shapes how the whole app feels. It also pulls together data owned by several teams, which makes it a natural place for architecture arguments. Interviewers ask this design question to see whether we can compare three real options on latency, resilience and ownership rather than picking one by habit. In this answer, we will look at each option in turn, then see how partial content works, and finish with how to choose.

1Option 1: The App Calls Each Service Itself

The simplest design is for the mobile app to call the profile, orders, recommendations and loyalty APIs directly. It needs no extra backend, and each team controls its own API.

The problems appear on real networks. A mobile connection may have a round-trip time of 100 to 300 ms, and on a weak signal each new request can take much longer. Even if the app sends the four requests in parallel, it pays connection setup, TLS and radio wake-up costs, and battery use rises. Worse, the internal services are now public: they need authentication for external clients, rate limiting and careful versioning, because old app versions stay installed for months and keep calling old endpoints. Every change to the screen requires an app release.

2Option 2: Compose in a Gateway or BFF

A backend-for-frontend is a small service built for one client, here the mobile app, that turns one app request into the internal calls it needs. The app makes a single call such as GET /mobile/home; the BFF calls the four services in parallel inside the data centre, where round trips take one or two milliseconds, and returns one response shaped exactly for the screen. Some teams do the same in an API gateway with composition features, but a BFF written as an ordinary Spring Boot service is easier to test and change.

The BFF needs discipline. Each call has a timeout, for example 300 ms, the whole response has a budget, and each part has a fallback so one slow service does not hold the screen. The BFF's latency is roughly the slowest of the four calls, and its availability still depends on the services that are critical to the screen.

Step throughHome screen through a BFF
Mobile appMobile BFFProfileOrdersRecommendations
GET /mobile/home
profile (parallel)
recent orders (parallel)
recommendations (parallel)
profile in 40 ms
orders in 90 ms
300 ms timeout: recommendations -> none
one response, recommendations omitted

8 messages in order. Play them, or step through them one at a time.

Loyalty is called the same way; it is left out of the picture to keep it readable.

3Option 3: A Precomputed Read Model

The third option builds the home screen data ahead of time. A home-feed service listens to events from the other services, such as ProfileUpdated, OrderPlaced, PointsChanged and RecommendationsRefreshed, and keeps one document per user with everything the screen shows, stored in a fast store like Redis or a document database. When the app asks for the home screen, the service reads one document, which takes a few milliseconds.

This is the fastest and most resilient option: if the orders service is down, the home screen still shows the last known orders. But it is eventually consistent, so an order placed a second ago may not appear yet, and it is more work: every source must publish events, the read model must handle duplicates and ordering, and we need a way to rebuild it from scratch when its format changes.

Comparing the three options
AspectClient-side callsBFF compositionRead model
Requests from the appFourOneOne
LatencySeveral mobile round tripsSlowest internal callOne fast read
When a service is downThat part fails in the appFallback or partialLast known data shown
FreshnessCurrentCurrentSeconds behind
ExposureInternal APIs made publicOnly the BFF is publicOnly the feed is public
Build effortLow on backendMediumHigh

4Returning Partial Content

Whatever the option, the screen should not fail because one non-critical part failed. Recommendations are a good example: if the recommendations service is slow or down, the home screen can simply hide that section or show a generic list. The profile, by contrast, may be critical if the screen greets the user by name and shows their membership level, so its fallback might be a cached copy.

In the BFF, that means each part has its own fallback and the response says which parts are missing, so the app can show a placeholder and monitoring can count fallbacks. A clear contract between the BFF and the app, for example a sections list where each section has a status of ok or unavailable, avoids guesswork in the client.

JSON
{
"profile": { "status": "ok", "name": "Asha", "tier": "GOLD" },
"orders": { "status": "ok", "recent": [ { "id": "o-901", "state": "SHIPPED" } ] },
"loyalty": { "status": "ok", "points": 1240 },
"recommendations": { "status": "unavailable" }
}

5How to Choose

Three questions settle most cases. First, latency: if the screen must load in under 200 ms at p99 for millions of users, a read model is the most reliable way, while a BFF can usually reach 300 to 500 ms. Second, change rate and freshness: data that changes often and must be current, such as an order that was just placed, favours composition, while data that changes slowly suits a read model. Third, ownership: a BFF is usually owned by the mobile team, which can change the screen without waiting for others, while a read model needs every source team to publish good events.

For most teams I would start with a BFF owned by the mobile team, with parallel calls, timeouts and partial results, because it fixes the chatty client and the exposure problem at moderate cost. If the home screen later needs lower latency or better resilience, we can move the most expensive parts into a read model behind the same BFF endpoint, without the app noticing.

6Follow-up questions

Can a BFF and a read model be combined?

Yes, and it is common. The BFF stays the single entry point for the app, and for some sections it reads from a precomputed model while for others it calls a service live. For example, recommendations and loyalty points can come from a read model refreshed by events, while recent orders are fetched live for freshness.

Should the BFF contain business logic?

Only presentation logic: choosing fields, formatting, combining parts and deciding fallbacks for the screen. Business rules, such as how loyalty points are calculated, stay in the owning service. Otherwise the BFF becomes a second home for rules that drift from the real owner.

What about GraphQL instead of a BFF?

A GraphQL server is another way to compose: the app asks for exactly the fields it needs and resolvers fetch from the services. It still needs the same timeouts, parallel fetching and partial results, and it shifts some design work to query cost control. It suits products with many clients that need different shapes of the same data.

7Conclusion

In this answer, we compared three ways to build a home screen from four services. Client-side calls are chatty on mobile networks and expose internal services. A BFF or gateway composes the data in parallel near the services and returns one response, provided it uses timeouts and partial results. A precomputed read model is the fastest and most resilient but is eventually consistent and costly to build. We return partial content when non-critical parts fail and choose by latency, change rate and ownership.

What to say in the interviewAbout 90 seconds aloud

Open with

I would compare them on network cost, resilience and ownership. If the app calls the four services itself, it makes several requests over a mobile network with high round-trip times and battery cost, and the internal services become public APIs that must handle external auth and old app versions forever.

Then, if they want more

A backend-for-frontend owned by the mobile team fixes that: the app makes one call, the BFF calls profile, orders, recommendations and loyalty in parallel inside the data centre, each with a timeout, and returns one response shaped for the screen. Latency becomes roughly the slowest internal call.

A precomputed read model goes further: a service listens to events from the four services and keeps one document per user, so the screen is a single fast read and still works when a source is down, but the data is eventually consistent and it is more work to build and rebuild.

In any option I would return partial content, so if recommendations fail, the screen hides that section, and the response marks each section's status. To choose, I would look at latency targets, how fresh each part must be and who owns the work.

I would usually start with a BFF and move the hottest or slowest sections into a read model behind it if needed.

About this answer

Last updated
12 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 documentation below. 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 "A mobile home screen needs data from the profile, orders, recommendations and loyalty...": https://scrivio-interview-library.netlify.app/spring-boot/microservice-design/92f9c7b12c/