SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 38
Design a local marketplace for listings
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
SYSTEM DESIGN SKETCHBOOK / FOLLOW-UPS
Design a local marketplace for listings
Finish your first sketch before answering these. Cross out freely.
- A seller uploads 10 photos from a phone on a weak connection. How do you avoid listings stuck half-created, and orphaned photos?
- A buyer filters to "bikes under $200 within 10 km, newest first". How does your index answer that in a city with 2 million listings, and in a village with 40?
- A listing sells while it sits in hundreds of cached result pages. How quickly does it disappear, and what if a buyer opens it anyway?
- A buyer taps "Message seller". What is the minimal conversation model so a seller with 50 inquiries about one bike can manage them?
- Scammers post the same fake listing 500 times across different cities. Where in your pipeline do you catch it?
Compare afterwards: worked approaches and reading at sketchbook /questions/marketplace-listings/review