Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Scaling Uber's Real-time Market Platform

1,256 views

Published on

Matt Ranney explains the Uber architecture overall, with a focus on the dispatch systems, the geospatial index, handling failure, and dealing with the distributed traveling salesman problem.

Published in: Software

Scaling Uber's Real-time Market Platform

  1. 1. SCALINGUBER’S REALTIMEMARKET PLATFORM QCON LONDON 2015
  2. 2. partners riders dispatch post trip processing money maps / ETA services databases
  3. 3. partners riders dispatch post trip processing money maps / ETA services databases
  4. 4. partners riders dispatch post trip processing money maps / ETA services databases
  5. 5. partners riders dispatch post trip processing money maps / ETA services databases
  6. 6. partners riders dispatch post trip processing money maps / ETA services databases
  7. 7. MICROSERVICES
  8. 8. partners riders dispatch post trip processing money maps / ETA services databases
  9. 9. partners riders dispatch post trip processing money maps / ETA services databases
  10. 10. partners riders dispatch post trip processing money maps / ETA services databases
  11. 11. partners riders dispatch post trip processing money maps / ETA services databases
  12. 12. dispatch post trip processing money maps / ETA services databases
  13. 13. •1 rider, 1 vehicle •Moving people •Sharding by city •MPOF PROBLEMS
  14. 14. dispatch post trip processing money maps / ETA services databases
  15. 15. supply humans demand humans demandsupply Dispatch
  16. 16. supply humans demand humans demandsupply Dispatch
  17. 17. supply humans demand humans demandsupply Dispatch
  18. 18. supply humans demand humans demandsupply Dispatch DISCO
  19. 19. supply humans demand humans demandsupply Dispatch DISCO geo by supply geo by demandrouting / ETA
  20. 20. supply humans demand humans demandsupply Dispatch DISCO geo by supply geo by demandrouting / ETA
  21. 21. demandsupply Dispatch DISCO geo by supply geo by demandrouting / ETA
  22. 22. Source: Geometry on the Sphere: Google's S2 Library
  23. 23. Source: Geometry on the Sphere: Google's S2 Library
  24. 24. •reduce waiting •reduce extra driving •lowest overall ETAs GOALS
  25. 25. D1 Pickup request S1 best ETA +8 mins time S1 pickup after 8 mins
  26. 26. time S2 drop off +2 mins S2 ETA from drop off +1 min D1 Pickup request S1 best ETA +8 mins S1 pickup after 8 mins
  27. 27. time D1 Pickup request S2 best ETA +3 mins S2 pickup after 3 mins
  28. 28. time S2 pickup D2 D1 Pickup request S2 best ETA +3 mins D2 Pickup request S2 best ETA +1 mins S2 pickup D1 S2 drop off D1 S2 drop off D2
  29. 29. demandsupply Dispatch DISCO geo by supply geo by demandrouting / ETA
  30. 30. •performance •forwarding •language support •proper pipelining •checksums / tracing •encapsulation GOALS
  31. 31. AVAILABILITY •everything retryable •everything killable •crash only •small pieces
  32. 32. CULTURAL CHANGES •no pairs •kill everything •even databases
  33. 33. load balancerservice A service B
  34. 34. load balancer service A service B
  35. 35. •overall latency ≥ latency of slowest component •1ms avg, 1000ms p99 •use 1: 1% at least 1000ms •use 100: 63% at least 1000ms •1.0 - 0.99^100 = 0.634 = 63.4% LATENCY
  36. 36. service A service B (1) service B (2) req 1, also B (2) +5ms req 1, also B (1) cancel req 1
  37. 37. DATACENTER FAILURE
  38. 38. partner app dispatch DC1 Location Updates State Digest dispatch DC2 Location Updates State Request
  39. 39. THANKS

×