CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/System Design Interview Classics

📝 System Design Interview Classics · C4 Architecture · Pro

Ride Matching System (Uber-style)

The core of a ride-hailing app: drivers stream their locations, a geo index finds nearby drivers, and a matching service offers the trip to the best one.

More System Design Interview Classics templates

C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.

Drawing diagram…

What this diagram shows

  • Driver locations are updated every 4 seconds into a geo index
  • Matching offers the trip to one driver at a time with a timeout
  • Trips and payments are handled by separate services

Prompt used

Ride-hailing design: driver apps send GPS every 4 seconds to a location service that updates a geospatial index in Redis (geohash). Rider apps request a trip through the trip service. The matching service finds nearby available drivers, ranks them by ETA and offers the trip to one driver at a time. Accepted trips are stored in PostgreSQL. A pricing service computes fare and surge, and a payment service charges the rider at the end.

Mermaid code
C4Container
title Ride Matching
Person(rider, "Rider", "Requests trips")
Person(driver, "Driver", "Accepts trips")
System_Boundary(rh, "Ride Platform") {
  Container(loc, "Location Service", "Go", "Ingests driver GPS")
  ContainerDb(geo, "Geo Index", "Redis GEO", "Available drivers by area")
  Container(trip, "Trip Service", "Java", "Trip requests and status")
  Container(match, "Matching Service", "Go", "Finds and offers best driver")
  Container(price, "Pricing Service", "Python", "Fare and surge")
  Container(pay, "Payment Service", "Java", "Charges riders")
  ContainerDb(db, "Trip DB", "PostgreSQL", "Trips and history")
}
System_Ext(maps, "Maps API", "Routes and ETA")
Rel(driver, loc, "GPS every 4 s", "WebSocket")
Rel(loc, geo, "Updates position")
Rel(rider, trip, "Requests trip", "HTTPS")
Rel(trip, price, "Gets fare")
Rel(trip, match, "Find driver")
Rel(match, geo, "Nearby drivers")
Rel(match, maps, "ETA")
Rel(match, driver, "Trip offer")
Rel(trip, db, "Saves trip")
Rel(trip, pay, "Charge at end")

Related templates

C4 ArchitectureProSystem Design Interview Classics

URL Shortener System Design

The classic interview design for a service like bit.ly: short code generation, fast redirects from a cache, and click analytics processed separately.

SequenceSystem Design Interview Classics

Chat App Message Delivery (WhatsApp-style)

How a one-to-one chat message is delivered in a WhatsApp-style system, with sent, delivered and read ticks, and push notifications when the receiver is offline.

Data FlowSystem Design Interview Classics

Social News Feed (Twitter-style)

How posts reach followers' feeds: fan-out on write for normal users, fan-out on read for celebrities, and a ranked feed built from a cache.

FlowchartSystem Design Interview Classics

API Rate Limiter (Token Bucket)

How a token bucket rate limiter decides whether to let an API request through, using Redis so all servers share the same counts.

DeploymentProSystem Design Interview Classics

Notification Service Design

A notification system that sends email, SMS and push messages at scale: one API, a queue per channel, user preferences, and retries.

Data FlowSystem Design Interview Classics

Search Autocomplete (Typeahead)

How search suggestions appear as you type: a prefix index built offline from past searches, served from memory, and refreshed regularly.