ZipRide is a new ride-hailing startup launching in a single city (population ~2 million). The app needs to:
•Let riders request a ride and see nearby available drivers in real time.•Match riders with the closest available driver within 15 seconds.•Track the driver's location on a map during the ride (updates every 3 seconds).•Handle payment processing at ride completion.
The founding team has 4 engineers and a moderate cloud budget. They expect 50,000 rides per day within the first 6 months.
Launch a ride-hailing app in a single city with real-time driver matching. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Clarify requirements: MVP rideshare -- rider requests a ride, driver accepts, they are matched, fare calculated, payment taken. Core entities: riders, drivers, trips.
Estimate scale: ~50k rides/day, ~3k concurrent drivers updating location every 3 seconds. Simple architecture with the right data stores is sufficient.
Pick components:
Key tradeoffs to discuss:
MVP rideshare: mobile apps talk to a monolithic API server. PostgreSQL stores structured data (trips, users, payments). A fast key-value store stores driver locations separately since they update every 3 seconds -- SQL cannot handle that write rate efficiently. A session cache speeds up auth lookups. Keep it simple at this scale.