Design a Parking Spot Finder

Hard45 min
1 / 30
System design answer

Design a Parking Spot Finder

Hard45 min30 sections
understanding•10 min read

Problem Statement: A City-Scale Real-Time Occupancy Network

Frames parking search as a physical-state synchronization problem, not a map query.

Problem statement

Design a Parking Spot Finder platform that aggregates real-time occupancy data from heterogeneous sources — in-ground sensors on street spaces, entry/exit counters and camera guidance systems inside garages, enforcement ALPR scans, and operator overrides — and gives drivers a live map of available spots, optional guidance to a chosen spot, holds or reservations, and payment. The platform must absorb dynamic occupancy changes continuously while thousands of concurrent drivers search the same popular districts.

Donald Shoup's widely cited cruising research estimated that roughly 30% of downtown traffic is drivers searching for parking, and SFMTA's published SFpark evaluation reported that demand-responsive pricing plus live availability cut average time spent searching for parking by about 43% in pilot areas. The problem is real, measured, and municipal.

Why this is not a map search problem

A generic POI search returns mostly-static data. Parking availability is physical state that changes every few seconds and is observed by noisy sensors. Showing a spot as free when it was taken ninety seconds ago sends a driver on a wasted trip and destroys trust. The design therefore separates three concerns:

  1. Occupancy truth: a continuously updated, confidence-scored model of what is actually occupied, built by fusing sensor events, garage counters, ALPR scans, and manual overrides.
  2. Availability projection: freshness-labeled views (map tiles, facility summaries, search results) that drivers and city apps consume, with explicit staleness markers.
  3. Commitment: holds, reservations, and payments that must be strongly consistent because they transfer exclusive rights to one physical spot.

The four architectural planes

  1. Device and edge plane: sensors, garage controllers, gateways, store-and-forward buffering, OTA.
  2. Occupancy pipeline plane: ingestion, dedup, fusion, confidence scoring, state projection.
  3. Driver experience plane: search, map tiles, live WebSocket updates, holds, navigation handoff, payment.
  4. City and operations plane: operator consoles, enforcement, pricing policy, open-data feeds, compliance.

A strong answer keeps these planes separate: a WebSocket fan-out failure must not corrupt occupancy truth, and a sensor brownout must not silently turn committed holds into phantom spots.

Key Highlights

  • •Parking availability is fast-changing physical state observed by noisy sensors, not static map data.
  • •Separate occupancy truth, freshness-labeled projections, and strongly consistent commitments.
  • •Shoup's cruising research estimates ~30% of downtown traffic is parking search.
  • •SFMTA published that SFpark cut average parking search time about 43% in pilot areas.
  • •Four planes: device/edge, occupancy pipeline, driver experience, city/operations.
Lead With Truth vs Display
State in the first two minutes that occupancy truth, availability display, and spot commitment are different consistency problems. That instantly separates you from answers that draw one cache and call it done.
Do Not Draw a Static Map Query
Treating availability as a periodic database lookup ignores sensor noise, change latency, and the race between two drivers heading to the same last spot.

Section Rescue Kit

Buzzwords to use:

Occupancy Truth ModelFreshness-Labeled Projection

Safe statements:

  • "Let me separate what is physically true from what we display, because they fail differently."
  • "Before choosing databases, I want to classify each dataset by how wrong it is allowed to be."
Design a Parking Spot Finder - System Design | WinJob | WinJob