Back to sketch

SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 38

Design a local marketplace for listings

Intermediate · 40 min · Geospatial & marketplaces

People sell used furniture, bikes and phones to others nearby. A seller snaps a few photos, writes a title and price, and the listing shows up in search; buyers browse by category, filter by price and distance, and message the seller to arrange pickup.

Requirements

  • Create, edit, mark as sold and delete a listing with up to 10 photos.
  • Search listings by keyword, category, price range and distance from the buyer, sorted by relevance, newest or nearest.
  • Keep new listings hidden until they pass automated moderation.
  • Remove sold, deleted and expired listings from search quickly; listings expire after 30 days unless renewed.

Constraints and assumptions

  • 100 million active listings; 5 million new listings per day (about 60 per second on average, 200 at peak).
  • 30,000 searches per second at peak; search p99 under 300 ms.
  • Photos average 4 per listing at about 2 MB each as uploaded from a phone.
  • A listing appears in search within 2 minutes of passing moderation; a sold or deleted listing disappears within 30 seconds.

Out of scope for the first sketch

Payments and shipping · Ratings and reviews · Personalized recommendation feed · Ads

Draw your design

Rough math and notes

Done on paper? Compare with the worked approaches