Trade-offs and mobile system design · senior
Mobile system design: an offline-capable feed
A mobile design round is won by a clear structure (requirements, client architecture, data and API, list and media performance, offline, observability), shown here on a feed: cursor-paged API, a local cache, FlashList with item types, thumbnail-first images, optimistic likes through an outbox, and network-aware prefetch.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Structure for about 45 minutes: functional and non-functional requirements (scale, devices, networks) → client architecture (UI, state, data layer, network, storage) → API contract → deep dives (list, media, offline, real-time) → failure cases → monitoring.
- API: cursor pagination with a page size and a snapshot/ranking id; only the fields a card needs; ETag or stale-while-revalidate.
- Client data: a normalised cache (TanStack Query or SQLite), dedupe by id, the cached first page shown on a cold start offline, background refresh.
- List: FlashList with getItemType per card type, recycling-safe state, onViewableItemsChanged to autoplay one video and pause the rest, a small pool of video players.
- Media: CDN-resized thumbnails, blurhash placeholders, prefetch the next page only on good networks.
- Offline actions (like, save, comment) go through the outbox with idempotency keys and optimistic UI.
- Observability: feed load time, frozen frames while scrolling, image error rate, engagement events.
The red pen
Common traps: mistake → fix
Mistake: Drawing backend boxes first
Fix: mobile rounds care most about the client.
Mistake: "One video player per item"
Fix: memory and hardware decoder limits; pool players.
Mistake: Ignoring low-end Android and slow networks.
Easy to hard
Questions interviewers ask, easy to hard
- Design the home feed of an image and short-video app with infinite scroll and offline viewing of recent items.
- Autoplay only the most visible video. How?
- What happens to memory after scrolling 500 items?
- The user likes a post while offline. What happens?
- Ranking changes cause duplicates across pages. Fix it.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.