skip to content

Mobile System Design

Designing one installed app end to end: offline sync over a local store, paged feeds, media and push pipelines, and releases that cannot be recalled. Senior mobile loops run it as a separate round.

on this pageshow

explore

questions

207 · 11 sections

In a mobile system-design round for a food-delivery app, which boxes go on the client block diagram and how does data flow between them?

level: juniorimportance: must knowfreq 45%
basics
~20 s

Draw UI, state holders, repository, local store, network client, sync engine and push handler. Screens render what state holders expose, state holders read the repository, and network, sync and push all write into the local store the repository serves.

open as a page

In a mobile system-design round for a city transit app with mobile tickets, what are the functional and non-functional requirements?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Functional requirements are what riders do: plan trips, check live departures, buy tickets, show one at the gate. Non-functional ones say how well: the ticket opens fast with no signal, data and battery stay cheap, screens are accessible, old phones are supported.

open as a page

Designing a food-delivery app's client with 25 minutes left in the round, which two deep dives would you open, and how do you justify them?

level: seniorimportance: must knowfreq 47%
basics
~20 s

Open the areas where this app fails worst or differs most: placing an order exactly once, and live order tracking. Justify each from a stated requirement, park the rest out loud, time-box both and let the interviewer redirect.

open as a page

In a transit app design round, the interviewer adds that tickets are scanned at underground gates with no signal; what does that requirement change across the design?

level: seniorimportance: must knowfreq 52%
basics
~20 s

Signal-free gates make the phone the home of a bought ticket: a purchase is not done until the ticket is stored, the ticket opens from a cold start with no network or blocking check, and server decisions such as voids arrive late.

open as a page

In a mobile design round for a food-delivery app, what belongs in the data-model and API sketch, and how deep should it go?

level: middleimportance: should knowfreq 36%
basics
~20 s

List the few entities the screens need with their ids, mark which the device keeps, then the handful of calls and messages per screen need. Stop at names and key fields; protocol, paging and retries are deep dives.

open as a page

In a mobile app's design, what do the presentation, domain and data layers each own, and what crosses the boundaries between them?

level: juniorimportance: must knowfreq 55%
basics
~20 s

The presentation layer turns state into screens and taps into calls; an optional domain layer holds rules several screens share; the data layer owns server and disk behind repositories. Only app models cross, never wire formats or table rows.

open as a page

In a mobile app's design, what do the foreground, background, suspended and terminated states mean, and what can the app rely on in each?

level: juniorimportance: must knowfreq 58%
basics
~20 s

Foreground: visible and interactive, with priority on CPU and memory. Background: off screen, briefly running, expected to save and go quiet. Suspended: in memory but not running, killable without notice. Terminated: no process; only saved UI state and disk remain.

open as a page

In an offline-capable mobile workout app, how should a repository arbitrate between the server and the local store as the single source of truth?

level: middleimportance: must knowfreq 60%
basics
~20 s

Make the local store the source of truth: screens observe the repository, which reads from the store, and server responses are written into the store and reach the screen only through it. Offline, the screen keeps working from what is stored.

open as a page

In a mobile loan-application form, which state belongs in memory, which in small saved UI state and which on disk, and why?

level: middleimportance: must knowfreq 66%
basics
~20 s

Memory holds the loaded screen state; it survives a UI rebuild but not process death. Small saved UI state holds the draft's identifier and step index needed to rebuild. Disk holds the draft and the ID photo, which must survive everything.

open as a page

In a modularized mobile app, why should one feature depend only on another feature's API module rather than on its implementation module?

level: middleimportance: must knowfreq 40%
basics
~20 s

An API module holds only a small, stable contract; the implementation module holds everything behind it. Depending on the API means implementation edits do not recompile other features, internals stay hidden, and the app module picks the implementation.

open as a page

In a mobile app's design, what are over-fetching and under-fetching for one screen, and why do both cost more on a slow cellular link?

level: juniorimportance: must knowfreq 42%
basics
~20 s

Over-fetching downloads fields a screen never shows; under-fetching makes the screen send several requests, often one after another, to build one view. On a slow, high-latency cellular link the first wastes scarce bandwidth and data, the second stacks round trips.

open as a page

In a mobile app with server-driven screens, what does the server send, and what must the installed build already contain?

level: juniorimportance: must knowfreq 32%
basics
~20 s

The server sends data: a tree of typed components with their properties and tap actions. The build must already ship a renderer for each component type and a handler for each action, so the server can recompose only what the build knows.

open as a page

Why must a mobile app's backend stay compatible with app builds released years ago, when a website's backend usually need not?

level: juniorimportance: must knowfreq 45%
basics
~20 s

An installed app build cannot be redeployed: users update late or never, so builds from years ago keep calling the API. The server changes in minutes but adoption takes years, so each change must work for every supported build.

open as a page

Would you choose REST, GraphQL or gRPC for a travel-booking mobile app used on slow roaming networks, argued from the device?

level: middleimportance: must knowfreq 46%
basics
~20 s

Argue from round trips per screen on a slow radio: REST keeps HTTP caching and easy debugging but needs screen-shaped endpoints, GraphQL fetches one screen's fields in one request, and gRPC brings binary messages and codegen but needs HTTP/2 end to end.

open as a page

In a mobile payments app, how do you make the Send money call safe to retry on a flaky network?

level: middleimportance: must knowfreq 55%
basics
~20 s

Create one idempotency key on the device when the user confirms the transfer, send it in the Idempotency-Key header, and reuse that same key on every retry of that intent, automatic or manual. A new key per attempt can pay twice.

open as a page

In a household app synced across two offline phones, what must each edit carry so the server can tell it used a stale copy?

level: juniorimportance: must knowfreq 50%
basics
~20 s

The revision it was made from: the server-assigned version number or entity tag the phone stored with its copy. The server applies the edit only if that base still matches; otherwise it merges or rejects instead of silently overwriting.

open as a page

In an offline community-events mobile app, where must an optimistic RSVP live so it still shows, marked pending, after the app is killed and relaunched?

level: juniorimportance: must knowfreq 52%
basics
~20 s

In the app's persistent local store, written in the same transaction as the RSVP's queued request, with a pending marker on the record itself. Screens observe the store, so the RSVP and its pending badge reappear after any relaunch.

open as a page

In an offline field-inspection mobile app, why must a checklist change and its outbox entry be written to disk in one local transaction?

level: juniorimportance: must knowfreq 55%
basics
~20 s

A backgrounded app can be killed with no shutdown code, so an in-memory queue dies with it. Committing the record change and its outbox entry in one transaction means no kill leaves a change shown but unsent, or queued but not shown.

open as a page

In a household app where partners edit shared lists offline, which conflict policy fits a checked flag, a note body, item order and a counter?

level: middleimportance: must knowfreq 52%
basics
~20 s

Choose per data type by what losing an edit costs: last-write-wins for a checked flag or a title, per-field merge for items, increments for counters, a sort key per item for order, and the user's choice for a note body.

open as a page

In a mobile mail client that pulls changes by sync token, when should it save the new token, and why then?

level: middleimportance: must knowfreq 47%
basics
~20 s

Save the new token only in the same local transaction that commits the changes it covers. Saved earlier, a kill skips those changes for good; saved with them, a kill at worst repeats a pull the client applies idempotently.

open as a page

In a mobile city-guide app, what are the memory and disk caches each for, and in what order is a venue looked up?

level: juniorimportance: must knowfreq 52%
basics
~20 s

The memory tier holds parsed data for the screens in use and dies with the process; the disk tier survives relaunches but the OS may purge it. Lookups try memory, then disk, then network, copying hits upward.

open as a page

In a mobile sports app, a fan opens a league table cached an hour ago in a crowded stadium: what should the screen show, and when?

level: juniorimportance: must knowfreq 56%
basics
~20 s

Show the cached table at once and refetch it in the background (stale-while-revalidate). Fresh rows replace old ones in place without moving the scroll; if the refetch fails, the cached table stays, labelled with its age, with a retry.

open as a page

In a mobile language-learning app, which data deserves the persistent store, and which can live in a disposable cache?

level: juniorimportance: must knowfreq 52%
basics
~20 s

Persist anything that is the only copy (grades, progress, streaks, settings) or that the user needs offline (downloaded lessons, the course list); cache only what exists for speed and can be re-fetched with nothing lost.

open as a page

On a 2 GB phone, how would you size a city-guide app's memory and disk caches, and what would each evict first?

level: middleimportance: must knowfreq 50%
basics
~20 s

Size each tier from a stated device budget: memory as a share of the app's memory budget, disk as an app-set ceiling cut when storage is low. Bound both in bytes; evict least recently used, and age out untouched entries.

open as a page

In a mobile sports fixtures-and-results app, how would you set different staleness rules for the fixture list, the league table and a match screen?

level: middleimportance: must knowfreq 54%
basics
~20 s

Give each screen its own freshness window and ceiling from how fast its data changes and what a wrong value costs: fixtures hours, tables minutes, a live match seconds. Tighten windows by match state, and revalidate conditionally.

open as a page

In a mobile recipe feed thousands of items deep, why create views only for rows near the viewport and recycle them?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A view per item makes memory and creation work grow with the feed, though the screen shows about five cards. Virtualization keeps views only near the viewport, and recycling rebinds scrolled-off views to incoming items, so cost tracks the screen.

open as a page

In a mobile news app's infinite feed, what load state stops one page being requested twice and keeps a failed load from ending the list?

level: middleimportance: must knowfreq 58%
basics
~20 s

Keep one load state per direction outside the view: idle with a cursor, loading, failed or ended. Scroll triggers start a request only from idle, stale responses are dropped, and a failure shows an inline retry row, not the end.

open as a page

In a mobile news app's infinite feed, how do you size a page and decide how far from the end to request the next one?

level: middleimportance: must knowfreq 62%
basics
~20 s

Derive both from the screen and the link: the prefetch distance must cover the rows a reader scrolls during a slow page request, and a page should span several screens so requests stay infrequent. Express both in screens, not fixed rows.

open as a page

In a mobile recipe feed, why should list updates diff old and new items by stable id rather than by row position?

level: middleimportance: must knowfreq 58%
basics
~20 s

Positions shift whenever an item is inserted, removed or moved, so updates by position rebind and animate the wrong rows. Diffing by a stable id finds exactly which items were inserted, deleted, moved or changed, and redraws only those.

open as a page

In a mobile news app read on commutes, how should fetched feed pages be stored so a relaunch with no signal shows articles at once and paging resumes?

level: seniorimportance: must knowfreq 55%
basics
~20 s

Write each page into a local database and render the feed only from it, saving the articles, their server order and the next cursor in one transaction. A relaunch then paints the stored window at once and continues from that cursor.

open as a page

In a mobile art-museum app, why do small artwork JPEGs in a grid crash older phones with out-of-memory, and what fixes it?

level: juniorimportance: must knowfreq 58%
basics
~20 s

Memory follows pixels, not file size: a 4000 x 3000 photo decodes to about 48 MB at four bytes a pixel, however small the JPEG. Read the dimensions first; decode downsampled to the cell's pixels, off the UI thread.

open as a page

In a fashion catalogue app's two-column product grid, how should the app work out which image size to request for each photo?

level: juniorimportance: must knowfreq 45%
basics
~20 s

Multiply the cell's layout size by the screen's density to get its size in pixels, then request the smallest server-made variant at least that wide. Never fetch the original: it wastes cellular data and decodes far larger than the cell.

open as a page

Why must a wedding-photography app keep its upload queue on disk, and what should each queued photo or video record?

level: juniorimportance: must knowfreq 46%
basics
~20 s

Because the OS may end a backgrounded app at any time, taking its memory with it. Each entry records the file's path, size and content hash, its state (waiting, uploading, committed, failed) and the server's upload address.

open as a page

In a mobile art-museum app, what path does one artwork image request take from memory cache to network, and where does coalescing happen?

level: middleimportance: must knowfreq 54%
basics
~20 s

Check the memory cache of decoded images by URL and target size; on a miss, read the encoded bytes from disk, else fetch them once, sharing any in-flight request; decode downsampled off the UI thread, then fill both tiers.

open as a page

For a fashion catalogue app's photos, should the server offer fixed size buckets or any requested width, and how does each affect CDN hit rate?

level: middleimportance: must knowfreq 42%
basics
~20 s

Offer a short list of size buckets and have the app round up to the next one. Any-width resizing scatters each photo across many cache keys, so most requests miss, and an open resize endpoint invites abuse.

open as a page

In a mobile live trivia-show app, when should the client open and close its live socket as the player switches apps, and why?

level: juniorimportance: must knowfreq 52%
basics
~20 s

Open the socket when the app reaches the foreground and close it on backgrounding, perhaps after a short grace. The OS will not keep a socket alive for an unused app; push is the background path.

open as a page

In a dating app's mobile chat, why should the phone generate each message's id when the message is composed, before the first send attempt?

level: juniorimportance: must knowfreq 65%
basics
~20 s

An id minted once at compose time lets the client show the message at once, lets the server recognise a retried send as the same message, and lets every acknowledgement or returning copy update one row instead of adding another.

open as a page

In a parcel-tracking app, why can't a data-only push be trusted to keep the shipments list current, and what does the app do instead?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A data-only push is best effort on APNs and FCM alike: it may be held while the phone sleeps, throttled, replaced or lost. Treat it as a hint, and fetch the shipments list whenever the app opens or returns to the foreground.

open as a page

Why can't a mobile auction app keep its bidding-room connection open while backgrounded, and what replaces it?

level: juniorimportance: must knowfreq 60%
basics
~20 s

To save battery the OS soon stops a backgrounded app from running or using the network, so its socket dies. Alerts go through the platform push service instead, and on return the app re-fetches the lot before trusting anything.

open as a page

In a dating app's mobile chat, what moves a message through sending, sent, delivered and read, and what does the sender see while offline?

level: middleimportance: must knowfreq 68%
basics
~20 s

Sending means only the phone holds it; sent, the server acknowledged it with a sequence number; delivered, the match's device stored it; read, they viewed it. Offline the bubble stays visibly pending, and failure shows with a retry, never a silent drop.

open as a page

In a personal-budgeting phone app, how should the nightly bank-transaction import be scheduled, and what can the design count on about when it runs?

level: juniorimportance: must knowfreq 55%
basics
~20 s

Submit it as deferrable work with constraints (network, ideally charging) and an earliest start, not a 2 a.m. alarm. The OS may run it hours late or not at all, so show data age and refresh on open.

open as a page

In a phone photo-editing app, how long does each frame have at 60 Hz and 120 Hz, and what happens when the app misses it?

level: juniorimportance: must knowfreq 58%
basics
~20 s

About 16.7 ms at 60 Hz and 8.3 ms at 120 Hz, of which the app's own work gets only part. A missed deadline is not a slightly late frame: the old picture stays a whole refresh longer.

open as a page

In a phone weather app fetching a 2 KB forecast every 20 seconds, why does the battery drain far more than the bytes suggest?

level: juniorimportance: must knowfreq 48%
basics
~20 s

Each request wakes the cellular radio, which then lingers in high-power states for seconds after the transfer. A request every 20 seconds keeps it from ever reaching standby, so the energy goes on wake-ups and tails, not bytes.

open as a page

In a music-streaming phone app, what do cold, warm and hot starts each rebuild, and why budget the cold start?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A cold start creates the process, builds the app's object graph and draws the first screen; a warm start redoes part of that; a hot start brings a still-resident app forward. Budget the cold start, because it does all the work.

open as a page

A budgeting phone app requests a 15-minute balance refresh, but field logs show a few runs a day; why, and how should the design cope?

level: middleimportance: must knowfreq 58%
basics
~20 s

A periodic interval is a minimum gap, not a timetable; runs also wait for constraints, deep-idle windows, battery-saving modes and usage priority. Design for a few runs a day: refresh on open, show data age, alert from the server.

open as a page

In a note-taking phone app's release build, crash reports show only hex addresses and renamed frames; what must the release pipeline keep and upload?

level: juniorimportance: must knowfreq 52%
basics
~20 s

The symbol and mapping files of the exact build the store shipped, uploaded by the job that built it and matched to each report by the binary's build identifier; without them, the app's own frames stay unreadable.

open as a page

In a smart-home security app, why can't a bad store release be rolled back like a server deploy, and what does halting it do?

level: juniorimportance: must knowfreq 55%
basics
~20 s

An installed app version stays on every phone that received it; no store pushes the previous build back. Halting a staged release only stops more phones getting it, so the fix is a newer version rolled forward.

open as a page

In a mobile puzzle game fetching remote configuration at launch, what does an offline first launch use, and when do fetched values take effect?

level: middleimportance: must knowfreq 52%
basics
~20 s

Defaults compiled into the build cover a first launch with no network; later launches use the last fetched values saved on disk. A new fetch is stored, then activated only at a safe point: the next launch or between levels.

open as a page

In a casual mobile game, the bundled ads SDK crashes at launch on one OS version; how would you design a kill switch for it?

level: middleimportance: must knowfreq 50%
basics
~20 s

Guard the SDK's start with a switch read from stored configuration before the SDK initialises, targeted by OS and app version, and make the game run without ads; add a local crash-loop guard for phones with nothing stored.

open as a page

Mid staged release, a smart-home security app's update makes door-lock pairing fail for some users; how do you decide to halt and ship the fix?

level: middleimportance: must knowfreq 48%
basics
~20 s

Halt on a rule agreed before release: pairing failures by app version on the server, the crash signal, support contacts. Ship the smallest fix as a new version from the release branch, staged again; native code cannot go over the air.

open as a page

In a law firm's client-portal phone app, why can't the refresh token live in a plain preferences file, and what should the app never store?

level: juniorimportance: must knowfreq 58%
basics
~20 s

A plain preferences file is cleartext that device backups, file copies and rooted or jailbroken phones expose. Keep the refresh token in the OS-protected credential store; never persist the password, and keep only what offline use needs.

open as a page

In a law firm's client-portal app with offline case documents, how should they be encrypted at rest, and what does a hardware-backed key defend against?

level: middleimportance: must knowfreq 55%
basics
~20 s

Encrypt documents and the database under a data key that a non-exportable, hardware-backed key protects, never stored beside them. That defeats copied files and backups read elsewhere, not code running as the app on an unlocked or compromised phone.

open as a page

Should a banking app pin its server keys, and for which domains: its own API, an image CDN, an analytics host?

level: middleimportance: must knowfreq 48%
basics
~20 s

Pin the bank's own API, not hosts it does not control. Pinning defeats a mis-issued or device-added certificate authority, but it costs lockout risk when keys change, breaks inspecting proxies and complicates testing, so it comes with a rotation plan.

open as a page

A banking app pins its API keys and two-year-old builds are still installed; how do you rotate the server key without locking those builds out?

level: seniorimportance: must knowfreq 42%
basics
~20 s

Never deploy a key that installed builds do not pin. Each build ships the live key, an offline backup and an expiry on the pin set; a new key goes live only after shipping for one expiry window, so every build pins it or has expired.

open as a page

In a banking app, how should the cleartext policy handle a partner's plain-HTTP feed and a plain-HTTP test server?

level: juniorimportance: should knowfreq 44%
basics
~20 s

Keep the app TLS-only, as current platform defaults already are. Move the partner feed to HTTPS or relay it through the bank's own HTTPS API, and give the test server a debug-only exception that the release build never carries.

open as a page