[Most Asked : ML System Design Case Studies #24] Thousands of Rides - What Happens When You Open the Uber App at an Airport During Busy Hours: How it Actually Works
Uncovering all the engineering insights and technical details..
Real-Time Airport Demand Forecasting at Scale : How it works?
Table of Contents
1. Introduction and User Experience
The User Experience
The Complete User Journey Flow
2. Understanding the Problem Domain
Understanding the Airport Demand Forecasting Problem
The Airport Demand Challenge
Traditional vs ML-Powered Approach
The Airport Ecosystem Data Flow
3. Multi-Model Architecture
The Demand Forecasting Architecture: Multiple Models Working Together
Multi-Model Ensemble Architecture
How the Models Work Together
Feature Engineering Pipeline
Real-time Model Serving Architecture
4. ETA Prediction System
ETA (Estimated Time of Arrival) Prediction System
Airport ETA Complexity
Multi-Component ETA Model
Lets get started—
The User Experience
Before diving into the machine learning models and infrastructure, let me start with what matters most - the seamless experience when you land at an airport and open the Uber app. In less than 2 seconds, Uber's demand forecasting system analyzes hundreds of variables, predicts wait times, optimizes driver positioning, and ensures you get a ride quickly. Here's exactly what happens:
Read Implemented LLMs System Design (recommended to complete previous parts) -
Understanding Transformers & Large Language Models: How They Actually Work - Part 1
Understanding Transformers & Large Language Models: How They Actually Work - Part 2
[LLM System Design #3] Large Language Models: Pre-Training LLMs: How They Actually Work - Part 3
The Complete User Journey Flow
┌─────────────────────────────────────────────────────────────┐
│ USER JOURNEY AT AIRPORT │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. APP OPENING AT AIRPORT │
│ ┌──────────────┐ │
│ │ User: Sarah │ → Opens Uber app at LAX Terminal 2 │
│ │ Location: LAX│ → GPS detected: 33.9425°N, 118.4081°W │
│ └──────────────┘ │
│ ↓ │
│ │
│ 2. LOCATION DETECTION (< 200ms) │
│ ┌──────────────────────────────────┐ │
│ │ • GPS coordinates captured │ │
│ │ • Airport geofence detected │ │
│ │ • Terminal identified: T2 │ │
│ │ • Pickup zone: LAX-T2-Upper │ │
│ │ • Flight tracking enabled │ │
│ └──────────────────────────────────┘ │
│ ↓ │
│ │
│ 3. DEMAND PREDICTION PIPELINE (< 500ms) │
│ ┌──────────────────────────────────┐ │
│ │ Current Context Analysis: │ │
│ │ • Time: 3:45 PM Tuesday │ │
│ │ • Flight arrivals: 12 in next hour│ │
│ │ • Historical demand: High │ │
│ │ • Weather: Clear, 72°F │ │
│ │ • Events: Lakers game tonight │ │
│ │ │ │
│ │ ML Prediction Engine: │ │
│ │ → Expected demand: 45 rides/10min │ │
│ │ → Available drivers nearby: 23 │ │
│ │ → Predicted wait time: 8 minutes │ │
│ └──────────────────────────────────┘ │
│ ↓ │
│ │
│ 4. REAL-TIME OPTIMIZATION (< 300ms) │
│ ┌──────────────────────────────────┐ │
│ │ Supply Positioning: │ │
│ │ • 5 drivers en route to LAX │ │
│ │ • 3 drivers repositioning from T1 │ │
│ │ • Incentives sent to 8 nearby │ │
│ │ │ │
│ │ Dynamic Pricing: │
│ │ • Surge multiplier: 1.2x │ │
│ │ • ETA to passenger: 8 minutes │ │
│ │ • Price estimate: $25-30 │ │
│ └──────────────────────────────────┘ │
│ ↓ │
│ │
│ 5. USER INTERFACE UPDATE (< 100ms) │
│ ┌──────────────────────────────────┐ │
│ │ App Display: │ │
│ │ • "8 min" pickup time shown │ │
│ │ • Map with nearby drivers │ │
│ │ • Price estimate displayed │ │
│ │ • "LAX Terminal 2" pickup shown │ │
│ │ • Flight tracking option offered │ │
│ └──────────────────────────────────┘ │
│ ↓ │
│ │
│ 6. CONTINUOUS UPDATES │
│ ┌──────────────────────────────────┐ │
│ │ Real-time Monitoring: │ │
│ │ • Demand updates every 30 seconds │ │
│ │ • Driver positions tracked live │ │
│ │ • Wait times adjusted dynamically │ │
│ │ • Flight delays factored in │ │
│ │ • Queue management optimized │ │
│ └──────────────────────────────────┘ │
│ │
│ Total Response Time: < 1.2 seconds ⚡ │
└─────────────────────────────────────────────────────────────┘
What Makes This Experience Seamless
Instant Location Intelligence The moment Sarah opens the app, Uber's geospatial system instantly recognizes she's at LAX Terminal 2. This isn't just GPS - it's a sophisticated location engine that understands airport layouts, pickup zones, and even which floor she's on. The system knows that Terminal 2 has specific pickup areas, queue dynamics, and traffic patterns that differ from other terminals.
Predictive Demand Analysis While Sarah sees a simple "8 min" pickup time, behind the scenes, Uber's demand forecasting engine has analyzed hundreds of variables: current time and day, historical demand patterns for this exact time/location, incoming flight schedules and delays, local events (Lakers game tonight means higher demand), weather conditions affecting travel patterns, and real-time signals from thousands of other users. This analysis happens in under 500 milliseconds.
Below are the top 10 System Design Case studies for this week
Billions of Queries Daily : How Google Search Actually Works
100+ Million Requests per Second : How Amazon Shopping Cart Actually Works
Serving 132+ Million Users : Scaling for Global Transit Real Time Ride Sharing Market at Uber
3 Billion Daily Users : How Youtube Actually Scales
$100000 per BTC : How Bitcoin Actually Works
$320 Billion Crypto Transactions Volume: How Coinbase Actually Works
100K Events per Second : How Uber Real-Time Surge Pricing Actually Works
Processing 2 Billion Daily Queries : How Facebook Graph Search Actually Works
7 Trillion Messages Daily : Magic Behind LinkedIn Architecture and How It Actually Works
1 Billion Tweets Daily : Magic Behind Twitter Scaling and How It Actually Works
12 Million Daily Users: Inside Slack's Real-Time Messaging Magic and How it Actually Works
3 Billion Daily Users : How Youtube Actually Scales
1.5 Billion Swipes per Day : How Tinder Matching Actually Works
500+ Million Users Daily : How Instagram Stories Actually Work
2.9 Billion Daily Active Users : How Facebook News Feed Algorithm Actually Works
20 Billion Messages Daily: How Facebook Messenger Actually Works
8+ Billion Daily Views: How Facebook's Live Video Ranking Algorithm Works
How Discord's Real-Time Chat Scales to 200+ Million Users
80 Million Photos Daily : How Instagram Achieves Real Time Photo Sharing
Serving 1 Trillion Edges in Social Graph with 1ms Read Times : How Facebook TAO works
How Lyft Handles 2x Traffic Spikes during Peak Hours with Auto scaling Infrastructure..
Dynamic Supply Optimization The system doesn't just predict demand - it actively shapes supply. As Sarah opens the app, the system is already sending positioning incentives to drivers, redirecting nearby drivers from oversupplied areas, and adjusting pricing to balance supply and demand. Five drivers are already en route to LAX based on the predicted demand spike from incoming flights.