Design Offline-Tolerant Trip State Sync for the Driver App
Last updated: November 29, 2026
Quick Overview
Design how the driver app keeps working when connectivity drops mid-trip, letting the driver start, pause, and end trips offline, and then reconciling those actions with the server without producing wrong fares or duplicate trips.
Uber
November 29, 20260
0
0 solved
Design how the driver app keeps working when connectivity drops mid-trip, letting the driver start, pause, and end trips offline, and then reconciling those actions with the server without producing wrong fares or duplicate trips.
Drivers lose signal in tunnels, garages, and rural areas, and Uber cannot let that block a trip or corrupt its billing. Interviewers use this to test client-server sync: local state machines, durable action queues, idempotent replays, conflict resolution against server-side changes, and trust boundaries for offline timestamps.
What the Interviewer Expects
- Model the trip as a state machine on both client and server
- Queue client actions durably with idempotency keys and replay in order
- Reconcile conflicts such as rider cancellation during the offline period
- Decide which offline data the server trusts (timestamps, GPS) and how to verify it
- Keep fares correct by recomputing from the buffered trace server-side
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- The rider cancelled while the driver was offline and the driver started the trip anyway. How do you resolve it?
- How do you stop a driver from faking an offline trip end to inflate time?
- What if the app is killed while offline? What survives?
- How would you test this whole flow reliably?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Driver can mark arrived, start trip, add stops shown earlier, and end trip while offline for up to tens of minutes. The app keeps recording GPS. On reconnect, everything syncs within seconds, the serv...
High-Level Design
- Client trip state machine (
ACCEPTED -> ARRIVED -> ON_TRIP -> COMPLETED) persisted to local storage on every transition. - Outbox: each user action is appended to a durable on-device queue ...