Uber Architecture

Real-time matching of riders and drivers across the globe.

On the roadmap:Software Architect · step 5: Learn from the giants

Overview

Uber's platform handles geo-spatial dispatch, pricing and payments in real time. It evolved from a monolith into thousands of microservices, with custom datastores built on MySQL.

Architecture highlights

  • Geo-sharded dispatch for low-latency matching
  • Schemaless: append-only datastore on sharded MySQL
  • Kafka as the backbone for event streaming
  • Domain-oriented microservice architecture

Architecture diagram

Key components

  • Dispatch service

    Matches riders with nearby drivers

  • Location pipeline

    Ingests driver GPS pings continuously

  • Schemaless / Docstore

    Sharded durable storage

  • Kafka

    Event bus for trips, payments and analytics

  • Pricing service

    Computes surge from supply and demand

Challenges and trade-offs

  • Geo-spatial indexing

    Finding nearby drivers requires efficient spatial indexes such as H3.

  • Write-heavy location stream

    Millions of location updates per second need partitioned ingestion.

  • Consistency of trips

    A trip must never be matched twice; state transitions need strict ordering.

Study: Uber

Learn how Uber is built from the people who explain it. Watch first for the picture, then read for the detail.