Uber: New Year’s Eve at Midnight
Hard · system design problem
At midnight, five times the riders open the app in the same few city blocks, drivers double their pings, surge prices update on one hot partition — and the payment provider throttles. You know exactly when it starts.
The busiest night of the year for ride-hailing, and it starts at a known second. Riders hit rider-api (autoscaling, 90 s to boot), which reads nearby drivers from a geo cache (4 small Redis nodes, fails closed) over Cassandra, asks surge-pricing to price each ride request (recording demand in a DynamoDB table: 4,000 WCU) and charges cards with provider A. Drivers stream locations through Kinesis (16 shards) to the matcher. At T+120s it is midnight: riders ×5 and drivers ×2 for three minutes; half of geo reads and half of surge writes are for one district. At T+150s provider A starts throttling. Provider B is under contract. The run is graded on the whole midnight.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.