← Back to All Questions
Easy~40 minE-Commerce

Design Facebook Marketplace

MetaAmazoneBayCraigslistOfferUp

📝 Problem Description

Design a local marketplace like Facebook Marketplace where users can list items for sale, browse nearby listings, communicate with sellers, and complete transactions. Focus on location-based discovery and trust/safety.

👤 Use Cases

1.
Seller wants to lists an item for sale so that item appears to nearby buyers
2.
Buyer wants to searches for items nearby so that sees relevant listings sorted by distance/relevance
3.
Buyer wants to messages seller so that starts conversation about the item
4.
Buyer wants to marks item as purchased so that listing is closed, seller gets notification

✅ Functional Requirements

  • Create listings with photos, description, price
  • Browse listings by category and location
  • Search with filters (price, distance, category)
  • In-app messaging between buyer/seller
  • Save/favorite listings
  • Report suspicious listings
  • User ratings and reviews

⚡ Non-Functional Requirements

  • Search results < 500ms
  • Support 50M daily active users
  • Handle 1M new listings per day
  • Location-based results within 2 seconds

⚠️ Constraints & Assumptions

  • Listings limited to 10 photos
  • Listings expire after 60 days
  • Search radius max 100 miles

📊 Capacity Estimation

👥 Users
50M DAU, 1M new listings/day
💾 Storage
100TB (photos) + 1TB (metadata)
⚡ QPS
Searches: 10K/sec, Messages: 50K/sec
📐 Assumptions
  • 50M daily active users
  • 1M new listings per day
  • Average 5 photos per listing @ 500KB each
  • 100M active listings at any time

💡 Key Concepts

CRITICAL
Geospatial Indexing
Use PostGIS or Elasticsearch geo queries for location-based search.
HIGH
Full-text Search
Elasticsearch for title/description search with relevance ranking.
HIGH
Image Optimization
Generate thumbnails and compress images for fast loading.

💡 Interview Tips

  • 💡Start with the geospatial search requirements
  • 💡Discuss the two-sided marketplace dynamics
  • 💡Emphasize the trust and safety features
  • 💡Be prepared to discuss messaging integration
  • 💡Know the difference from traditional e-commerce
  • 💡Understand the local-first nature of the platform