System Design Problems
Design Airbnb
Airbnb serves 150M+ users across 220+ countries with 7M+ listings. This design covers search with geo-filtering, booking with availability management, reviews, and payment processing.
- Scale â 150M+ users, 7M+ listings, 1B+ nights booked
- Search â Geo-filtered search with 100ms latency
- Booking â Double-booking prevention with distributed locks
Airbnb's core challenge is building a two-sided marketplace with trust, search, and real-time availability.
Requirements Clarification
Functional Requirements
- Search listings by location, dates, and filters
- View listing details with photos and reviews
- Book accommodations with availability check
- Leave reviews and ratings
- Messaging between hosts and guests
- Payment processing with escrow
- Host management dashboard
Non-Functional Requirements
- Availability: 99.99% uptime
- Latency: Search results < 500ms
- Consistency: Strong for bookings (no double-booking)
- Scale: 150M users, 100K searches/minute
Back-of-the-Envelope Estimation
High-Level Architecture
Search Architecture
Booking System: Preventing Double-Bookings
Trust and Safety
Data Model
Practice Exercises
- Search: Design a search system that returns results in < 100ms for 100K QPS.
- Availability: How would you handle a situation where two guests try to book the same listing at the exact same time?
- Payments: Design an escrow system where payment is held until checkout.
- Scale: How would you handle a flash sale where 100K users search for the same city simultaneously?
What to Learn Next
-> Design Uber Real-time location and dispatch.
-> Design Amazon E-commerce at scale.
-> Idempotency Handling duplicate requests.
-> Saga Pattern Distributed transactions.
-> Outbox Pattern Reliable event publishing.
-> Circuit Breaker Preventing cascade failures.