Design Geofence Detection for Dasher Arrival at a Restaurant
Last updated: November 29, 2026
Quick Overview
Design a system that detects when a Dasher has arrived at a restaurant and when they have left with the food, using phone location, so DoorDash can update the customer, alert the merchant and measure wait times accurately.
DoorDash
November 29, 20260
0
0 solved
Design a system that detects when a Dasher has arrived at a restaurant and when they have left with the food, using phone location, so DoorDash can update the customer, alert the merchant and measure wait times accurately.
Arrival and wait-time signals feed DoorDash's prep time models, Dasher pay for long waits and customer status updates, so false positives are costly. Interviewers check how you combine noisy GPS with geometry, where the detection runs (device or server) and how you handle dense urban areas like food halls.
What the Interviewer Expects
- Define geofences per store, including tricky cases like malls and shared buildings
- Decide device-side versus server-side detection and justify
- Use dwell time and hysteresis to avoid flapping
- Combine GPS with other signals such as Dasher tap actions
- Describe the event stream and consumers
- Plan for measuring accuracy
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
- How do you handle a store inside a large mall where the parking lot is 300 meters away?
- How would you detect a Dasher who marks arrived without being there?
- How do you learn better pickup points over time?
- What privacy limits apply to collecting location outside active deliveries?
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
Emit ARRIVED_AT_STORE, LEFT_STORE, ARRIVED_AT_CUSTOMER events for active deliveries within about 20 seconds of reality, with low false positives. Inputs are location pings every few seconds plus...
High-Level Design
- Geofence store: per store a pickup point and polygon (default a circle of 75 m; custom polygons for malls and airports), indexed by H3 cell.
- Detection: primary detection on the server usin...