64
SCALING UBER’S REALTIME MARKET PLATFORM QCON LONDON 2015

Scaling Uber's Real-time Market Platform

Embed Size (px)

Citation preview

Page 1: Scaling Uber's Real-time Market Platform

SCALING UBER’S REALTIME MARKET PLATFORMQCON LONDON 2015

Page 2: Scaling Uber's Real-time Market Platform
Page 3: Scaling Uber's Real-time Market Platform
Page 4: Scaling Uber's Real-time Market Platform
Page 5: Scaling Uber's Real-time Market Platform
Page 6: Scaling Uber's Real-time Market Platform
Page 7: Scaling Uber's Real-time Market Platform
Page 8: Scaling Uber's Real-time Market Platform
Page 9: Scaling Uber's Real-time Market Platform
Page 10: Scaling Uber's Real-time Market Platform
Page 11: Scaling Uber's Real-time Market Platform
Page 12: Scaling Uber's Real-time Market Platform
Page 13: Scaling Uber's Real-time Market Platform
Page 14: Scaling Uber's Real-time Market Platform
Page 15: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 16: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 17: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 18: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 19: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 20: Scaling Uber's Real-time Market Platform

MICROSERVICES

Page 21: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 22: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 23: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 24: Scaling Uber's Real-time Market Platform

partners riders

dispatch

post trip processing

money

maps / ETA services

databases

Page 25: Scaling Uber's Real-time Market Platform

dispatch

post trip processing

money

maps / ETA services

databases

Page 26: Scaling Uber's Real-time Market Platform
Page 27: Scaling Uber's Real-time Market Platform

•1 rider, 1 vehicle

•Moving people

•Sharding by city

•MPOF

PROBLEMS

Page 28: Scaling Uber's Real-time Market Platform

dispatch

post trip processing

money

maps / ETA services

databases

Page 29: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

Page 30: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

Page 31: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

Page 32: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

DISCO

Page 33: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

DISCO

geo by supply geo by demandrouting / ETA

Page 34: Scaling Uber's Real-time Market Platform

supply humans

demand humans

demandsupply

Dispatch

DISCO

geo by supply geo by demandrouting / ETA

Page 35: Scaling Uber's Real-time Market Platform

demandsupply

Dispatch

DISCO

geo by supply geo by demandrouting / ETA

Page 36: Scaling Uber's Real-time Market Platform

Source: Geometry on the Sphere: Google's S2 Library

Page 37: Scaling Uber's Real-time Market Platform

Source: Geometry on the Sphere: Google's S2 Library

Page 38: Scaling Uber's Real-time Market Platform
Page 39: Scaling Uber's Real-time Market Platform
Page 40: Scaling Uber's Real-time Market Platform
Page 41: Scaling Uber's Real-time Market Platform
Page 42: Scaling Uber's Real-time Market Platform

•reduce waiting

•reduce extra driving

•lowest overall ETAs

GOALS

Page 43: Scaling Uber's Real-time Market Platform

D1 Pickup request S1 best ETA +8 mins

time

S1 pickup after 8 mins

Page 44: Scaling Uber's Real-time Market Platform

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

Page 45: Scaling Uber's Real-time Market Platform

time

D1 Pickup request S2 best ETA +3 mins

S2 pickup after 3 mins

Page 46: Scaling Uber's Real-time Market Platform

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

Page 47: Scaling Uber's Real-time Market Platform

demandsupply

Dispatch

DISCO

geo by supply geo by demandrouting / ETA

Page 48: Scaling Uber's Real-time Market Platform
Page 49: Scaling Uber's Real-time Market Platform
Page 50: Scaling Uber's Real-time Market Platform
Page 51: Scaling Uber's Real-time Market Platform
Page 52: Scaling Uber's Real-time Market Platform

•performance

•forwarding

•language support

•proper pipelining

•checksums / tracing

•encapsulation

GOALS

Page 53: Scaling Uber's Real-time Market Platform
Page 54: Scaling Uber's Real-time Market Platform

AVAILABILITY

•everything retryable

•everything killable

•crash only

•small pieces

Page 55: Scaling Uber's Real-time Market Platform

CULTURAL CHANGES

•no pairs

•kill everything

•even databases

Page 56: Scaling Uber's Real-time Market Platform

load balancerservice A service B

Page 57: Scaling Uber's Real-time Market Platform

load balancer

service A

service B

Page 58: Scaling Uber's Real-time Market Platform
Page 59: Scaling Uber's Real-time Market Platform
Page 60: Scaling Uber's Real-time Market Platform

•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

Page 61: Scaling Uber's Real-time Market Platform

service A service B (1)

service B (2)

req 1, also B (2)

+5ms req 1, also B (1)

cancel req 1

Page 62: Scaling Uber's Real-time Market Platform

DATACENTER FAILURE

Page 63: Scaling Uber's Real-time Market Platform

partner app dispatch DC1Location Updates

State Digest

dispatch DC2

Location UpdatesState Request

Page 64: Scaling Uber's Real-time Market Platform

THANKS