Hard

Design Uber Surge Pricing System Design Interview

Design a dynamic pricing engine for a ride-sharing service.

1. Problem Statement

Design the Surge Pricing system for Uber. We need to update prices every minute based on local supply and demand heatmaps.

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph TD
    A[Rider/Driver Apps] -->|WebSocket/gRPC| B(API Gateway)
    B --> C[Location Ingestion Service]
    C -->|Kafka Topic: Locations| D[Flink Stream Processor]
    D -->|Aggregates per S2 Cell| E[(Redis: Heatmap Cache)]
    E -.->|Pulls TTL Data| F[Pricing Engine]
    F -->|Updates| G[(Cassandra: Price History)]
    F -->|Pushes Real-time Price| B

3. Key Focus Areas

  • 1
    Geospatial Indexing (S2 Cells)
  • 2
    Supply/Demand Aggregation (Streaming)
  • 3
    Consistency (Price Lock)
  • 4
    Latency (Calculate price < 50ms)
  • 5
    Feedback Loop (Throttling)

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Continue to Dashboard

Core Concepts

System DesignReal-time AnalyticsDistributed Locking

Continue preparing

Build a complete software engineer mock interview plan

Related System Design

Design a Cross-Product Tagging System

Design a shared tagging service that lets users apply tags to entities across multiple Atlassian products, with consistent search and deduplication.

Related System Design

Design a Notification System

Design a scalable notification service that sends emails, SMS, and push notifications to millions of users.