Member-only story
System Design Interview: mini Uber
Designing Uber, Lyft, Grab, and the like seems to be a popular system design interview question. In my opinion, the discussion points interviewers are looking for are probably two-fold: one, the candidate can sort out the user journey involving rider, driver, and the platform; two, the candidate can identify potential performance/scalability bottlenecks and pay attention to their optimization. I’ll go through the entire design question in this post to address the two aspects above.
User Journey
First of all, let’s put out the very scary user journey diagram and walk through the steps in the workflow. Bear in mind that I wrote this post offline, which means that I have a lot of time drawing and revising this diagram. It’s definitely not required that you’ll be able to formalize this structure on the spot.
There are 6 mini workflows in this combined user journey of rider, driver and the platform.
(0) We assume that the driver app is always online and reporting near real-time locations to the platform. The platform tracks driver locations for many reasons that become clear in later steps.
(1) When logged on, the rider app sends its current location to the platform. The platform searches and returns for nearest drivers to the rider app. The rider app displays that on a map.