GeospatialStaff Level

DoorDash / UberEats 3-Sided Marketplace

Orchestrate real-time food delivery between customers, restaurants, and couriers with batched routing and live order tracking.

Target Scale

Engineering Scale & Performance SLAs

Target production parameters expected in a senior or staff interview round.

Peak Throughput

25,000 Orders/min Peak

Sustained peak request volume during high-traffic events.

Active Users

25 Million Active Diners

Daily active users generating read and write operations.

Storage Ingestion

100 GB/day order and telemetry logs

Projected data ingestion and replication storage capacity.

Latency Budget

Driver dispatch assignment < 2s

Strict end-to-end percentile latency SLA constraint.

Stage 01

Functional & Non-Functional Requirements

Establish clear problem boundaries before proposing architectural components.

Functional Scope

Core System Capabilities

  • Diners search restaurants, customize menu items, and place checkout orders.
  • Restaurants receive, confirm, prepare, and mark orders ready for pickup.
  • Couriers receive optimized dispatch offers based on proximity and route batching.
  • Live GPS order tracking showing courier journey and real-time updated ETA.
Non-Functional Scope

Reliability & Latency SLAs

  • Strict order transaction consistency (payment capture synchronized with restaurant POS).
  • High availability for restaurant kitchen display tablets (never miss an incoming order).
  • Sub-2-second dispatch assignment optimization to minimize food wait time.
Stage 02

Capacity Estimation Math

Step-by-step arithmetic conversions for QPS, storage, and bandwidth.

DimensionCalculation FormulaEstimated Result
Peak Order Placement Volume25,000 orders/minute / 60 seconds = 416 orders/sec during dinner peak416 orders/second peak
Active Courier GPS Telemetry Ingestion200,000 active couriers transmitting GPS coordinates every 4 seconds50,000 GPS telemetry updates/second
Daily Dispatch Optimization Solver Cycles5 Million daily orders * 4 state transitions (Dispatch, Pickup, In-transit, Delivered)20 Million state machine lifecycle events/day
Stage 03

Multi-Tier Architecture & Component Topology

How requests navigate ingress gateways, application logic, caching, and persistence.

Order Gateway & Catalog Tier

GraphQL API Gateway · Restaurant Catalog Service · Elasticsearch Geo-Index

Serve restaurant menus with dynamic delivery radius bounding, pricing tiers, and dietary filters.

Dispatch Matching Engine

Dispatch Optimizer (Linear Programming / VRP Solver) · Courier Location Cache (Redis H3) · Offer Router

Batch multiple nearby orders, evaluate courier travel times, and issue timed 30-second acceptance offers.

Order Lifecycle State Machine

Order Orchestrator (Temporal / Cadence) · Restaurant Notification Bridge · Kafka Event Bus

Durable workflow managing: Placed -> Accepted -> Cooking -> Ready -> Picked Up -> Completed.

Real-Time Tracking & Telemetry

Telemetry Ingestion Gateway · WebSocket Broadcast Cluster · Map Matching Engine

Snap raw courier GPS coordinates to road networks and stream smooth car icon movement to customer phones.

Stage 04

Database Schemas & Partitioning Strategy

Entity models, indexing, and primary key partitioning.

Table: orders

PK: order_id

  • order_id (UUID PK)
  • customer_id (UUID)
  • restaurant_id (UUID)
  • courier_id (UUID NULL)
  • status (VARCHAR(32))
  • total_cents (INT)
  • created_at (TIMESTAMP)

Composite index on (restaurant_id, status) for kitchen display system order queues.

Table: order_items

PK: item_id

  • item_id (UUID PK)
  • order_id (UUID)
  • menu_item_id (UUID)
  • customizations (JSONB)
  • quantity (INT)
  • price_cents (INT)

Foreign key reference on order_id.

Table: courier_locations

PK: courier_id

  • courier_id (UUID PK)
  • h3_index (VARCHAR(15))
  • lat (DOUBLE)
  • lng (DOUBLE)
  • updated_at (TIMESTAMP)

Redis Geospatial / H3 index for instant radius lookup of available delivery drivers.

Stage 05

Critical Architectural Trade-Offs

How to defend engineering compromises when challenged by interviewers.

Decision Point

Courier Dispatch: Greedy Nearest Neighbor vs Batched Optimization Window

Option A: Greedy Instant Dispatch (Assign closest driver immediately)
Option B: Batched Time-Window Optimization (Aggregate orders over 30-60s intervals)

Rationale: Greedy dispatch causes couriers to make separate trips for orders from the same restaurant. Batched optimization reduces total travel distance by 30% by bundling deliveries.

Decision Point

Order Workflow: Ad-hoc Database Flags vs Durable Workflow Engine (Temporal)

Option A: Database status column updates with cron pollers
Option B: Durable Workflow Orchestrator (Temporal / Cadence)

Rationale: Food delivery has dozens of timeout edges (restaurant declines, driver cancels, delivery delayed). Temporal provides bulletproof state machines with built-in retry timers without dangling orders.

Technical FAQ

Frequently Asked Questions: DoorDash / UberEats 3-Sided Marketplace

Key interview questions and conceptual defenses.

How do you handle a courier rejecting a delivery offer?

If a courier rejects or lets the 30-second offer countdown expire, the dispatch engine instantly evaluates the next best candidate in the active H3 geospatial cell.

How do you keep restaurant tablet order delivery reliable when kitchen Wi-Fi is spotty?

Tablets maintain persistent bidirectional connections with automatic local SMS/phone call failover alarms if an incoming order is not acknowledged within 3 minutes.

Simulate this architecture

Practice DoorDash / UberEats 3-Sided Marketplace with ClawPad's interactive diagram overlay.

Download ClawPad