Week 10 · Day 2 · 2026-09-29 TUE · CORE · all deep dives + Bad/Good/Great
Uber deep dives: geo index, freshness, driver reservation, durable dispatch
今日目标
Cover every Uber deep dive and defend correctness when GPS, push notifications, or matcher workers are stale.
| 08:50-09:00 | Set target State the dispatch invariant before reading: one driver can hold at most one live offer. |
|---|---|
| 09:00-10:05 | Hello Interview deep dives Read all Uber deep dives and level expectations. |
| 10:05-10:45 | Failure walk Airport hot zone, stale driver point, double offer, dropped request, no-response timeout, geo-shard split. |
| 10:45-10:55 | Spoken close Bad/Good/Great plus failure/recovery/metrics without notes. |
| 14:30-16:15 | NeetCode Tag · Intervals Exactly three contiguous slots; each slot is 30m solve + 5m evidence. |
| 20:30-21:15 | Recall / Mock 20:30-21:15 Staff Q&A on stale location, dispatch race, fairness, and safe recovery. |
Live canonical source anchors
Daily anchors retain the original Hello Interview heading text.
| Project | Exact canonical source heading | Disposition | Use |
|---|---|---|---|
| Uber | Potential Deep Dives | deep dive | enter location and dispatch correctness |
| Uber | 1) How do we handle frequent driver location updates and efficient proximity searches on location data? | deep dive | geospatial index, in-memory geo store, hot-cell write path |
| Uber | 2) How can we manage system overload from frequent driver location updates while ensuring location accuracy? | deep dive | adaptive update interval, freshness, confidence |
| Uber | 3) How do we prevent multiple ride requests from being sent to the same driver simultaneously? | deep dive | driver reservation, TTL, idempotent assignment |
| Uber | 4) How can we ensure no ride requests are dropped during peak demand periods? | deep dive | durable queue, dynamic scaling, safe retry |
| Uber | 5) What happens if a driver fails to respond in a timely manner? | deep dive | timeout, cancellation race, durable execution |
| Uber | 6) How can you further scale the system to reduce latency and improve throughput? | deep dive | geo-sharding, read replicas, regional routing |
| Uber | What is Expected at Each Level? | level expectation | calibrate Senior+/Staff answer |
| Uber | Mid-level | level expectation | functional HLD and basic spatial index |
| Uber | Senior | level expectation | two deep dives with trade-offs |
| Uber | Staff+ | level expectation | three-plus deep dives with operating semantics |
DDIA decision links
| Week 10 decision | Exact DDIA subsection | Design consequence |
|---|---|---|
| How do airport/event zones avoid becoming one overloaded shard? | Ch7 - 倾斜的工作负载与缓解热点 | Detect hot cells, sub-split by ring/driver bucket, and move only overload, not the whole region. |
| How does a request find the right geo shard after rebalancing? | Ch7 - 请求路由 | A routing layer maps geocell and rideId to current owners with epoch/fencing, not hard-coded client routing. |
| What does stale location mean in the matching contract? | Ch9 - 带置信区间的时钟读数 | Every driver candidate carries observedAt, source, and confidence; old points lower score or are excluded. |
| How does a paused matcher avoid assigning a stale driver reservation? | Ch9 - 隔离僵尸进程和延迟请求 | Offer/reservation writes include an assignment epoch; stale owners cannot accept or release current offers. |
Algorithm block
| Slot | Problem | Pattern | Invariant | Bug risk | Time | Space |
|---|---|---|---|---|---|---|
| 4 | Insert Interval NEW · 30m solve + 5m evidence | ordered merge | Append all intervals ending before new, merge overlaps, append rest. | Touching endpoints and empty input. | O(n) | O(n) output |
| 5 | Merge Intervals NEW · 30m solve + 5m evidence | sort and fold | Result intervals are disjoint and sorted by start. | Sort by end instead of start. | O(n log n) | O(n) |
| 6 | Non Overlapping Intervals NEW · 30m solve + 5m evidence | greedy by end | Keep earliest end to maximize future capacity. | Counting kept vs removed backwards. | O(n log n) | O(1) extra |
Output and repair
| Deliverable | Uber deep-dive matrix with geospatial indexing, hot zones, freshness/confidence, driver reservation TTL, idempotent assignment, cancellation races, SLIs. |
|---|---|
| Repair rule | If the answer says only 'use Redis lock', add versioned DriverOffer, idempotency key, fencing token, timeout event, and compensation path. |
| Artifacts | Uber Chinese deep script Uber Chinese audio Uber English recall Uber recall PDF |
| English recall | English recall: defend freshness, reservation, race recovery, fairness, and observability without reading notes. |
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.