Mobile System Design Interview Questions
ADVANCED › System Design
How do you approach a mobile system design interview question?
What a strong answer covers: Clarify requirements and scope (functional, non-functional like offline, scale, latency), agree on the main user flows, sketch the high-level architecture (UI, ViewModel, repository, local storage, network, sync), define the API contract and data models, then dive into the hard parts: caching and offline, pagination, real-time updates, error handling, performance and testing. State trade-offs out loud and manage time.
What does a typical client-side architecture for a data-driven app look like?
What a strong answer covers: UI layer (screens and ViewModels exposing state), an optional domain layer (use cases), and a data layer of repositories coordinating a local database as the source of truth and remote APIs, with background sync through WorkManager, DI wiring it together, and cross-cutting pieces like analytics, logging, feature flags and image loading. Modules split by feature and core.
How would you design pagination and caching for a list from an API?
What a strong answer covers: Prefer cursor-based pagination over page numbers, because inserts during scrolling cause duplicates or gaps with offsets. Use Paging 3 with a RemoteMediator writing pages to Room so the list works offline and survives process death, store remote keys, refresh from the top with invalidation, decide on cache expiry, and handle loading, error and empty states for initial load and appends.
How do you decide between REST, GraphQL, WebSockets, server-sent events and push notifications for getting data to the app?
What a strong answer covers: REST is simple and cacheable for request-response; GraphQL lets the client fetch exactly the fields a screen needs, reducing over-fetching and round trips, at the cost of caching complexity. WebSockets are for bidirectional real-time while the app is open (chat, live collaboration); SSE for one-way server streams; push notifications (FCM) for when the app is in the background or closed, usually as a signal to sync rather than carrying full data.
Design a photo-sharing feed like Instagram's: what are the hard parts on the client, and how would you handle them?
What a strong answer covers: Hard parts: smooth scrolling with lots of images (correctly sized images from a CDN, prefetching, memory and disk cache), offline and caching of the feed with Paging and Room, uploads that survive app close (WorkManager, chunked and resumable, compression, idempotency), optimistic likes and comments with sync and rollback, real-time updates without jumping the scroll position, video autoplay, analytics, and performance on low-end devices and slow networks.