System Design Space
Knowledge graphSettings

Updated: March 2, 2026 at 9:25 PM

Airbnb

mid

Classic task: geo-search, availability calendar, dynamic pricing, two-sided marketplace.

Designing Airbnb is a classic System Design interview task that brings together geosearch, availability management, dynamic pricing and trust system. It is a two-sided marketplace with unique technical challenges.

Source

Acing the System Design Interview

A detailed analysis of Airbnb design is in the book by Zhiyong Tan.

Читать обзор

Key Features of Airbnb

7M+ listings
220+ countries
150M+ guests
2B+ nights booked

1Functional Requirements

Guest Flow

  • Search by location, dates, number of guests
  • Filtering (price, type of housing, amenities)
  • View listing with photos and reviews
  • Booking and payment
  • Messenger with host

Host Flow

  • Creating and editing a listing
  • Manage your availability calendar
  • Setting up pricing rules
  • Confirmation/rejection of bookings
  • Receiving payments

2Non-functional requirements

Low Latency Search

Geosearch < 200ms. Users expect instant results when changing a map.

High Availability

99.99% uptime. Bookings mean money, downtime is unacceptable.

Consistency

You can't sell the same night twice. Strong consistency for bookings.

System scale

Listings:7M
Searches/day:100M
Bookings/day:1M
Photos:500M+

3Geo Search: Search by location

Related topic

Proximity Service

Alex Xu discusses geosearch in detail in the chapter on Proximity Service.

Читать обзор

Approaches to geoindexing

ApproachDescriptionUse Case
GeohashString representation of coordinates, prefix matchingRedis, simple queries
Quadtree ✓Recursive division of space into 4 partsIn-memory search, Uber
S2 GeometryGoogle's library, hierarchical cellsGoogle Maps, Foursquare
PostGISPostgreSQL extension with R-tree indexesSmall scale

Airbnb Search Architecture

  1. 1Elasticsearch as the main search engine with geo_point type
  2. 2geo_bounding_box query for the visible area of the map
  3. 3Availability filter - join with availability calendar
  4. 4Ranking — ML model for personalizing results

Elasticsearch Query Example

{
  "query": {
    "bool": {
      "filter": [
        {
          "geo_bounding_box": {
            "location": {
              "top_left": { "lat": 40.73, "lon": -74.1 },
              "bottom_right": { "lat": 40.01, "lon": -73.12 }
            }
          }
        },
        { "term": { "property_type": "entire_home" } },
        { "range": { "price": { "gte": 50, "lte": 200 } } },
        { "range": { "guests": { "gte": 2 } } }
      ]
    }
  }
}

4Availability Calendar

Related case

Hotel Booking

A similar problem of availability management is discussed in the Hotel Booking case.

Читать обзор

⚠️ Main difficulty

The calendar must be eventually consistent for reading (search), but strongly consistent for writes (booking). You can't sell the same night twice!

Data Schema

-- Calendar by day
CREATE TABLE availability (
  listing_id UUID,
  date DATE,
  status ENUM('available', 
               'blocked', 'booked'),
  price DECIMAL,
  min_nights INT,
  PRIMARY KEY (listing_id, date)
);

-- Search index
CREATE INDEX idx_available 
ON availability(date, status) 
WHERE status = 'available';

Optimizations

  • Date ranges: Store intervals instead of individual days
  • Bitmap: 365 bits per year, fast operations
  • Caching: Redis for hot listings
  • Sharding: By listing_id for isolation

Synchronization with search

Elasticsearch should not store the full calendar because it changes too often. Instead, a two-step approach is used:

  1. 1ES returns candidates by geo + filters
  2. 2Availability Service filters by calendar (batch lookup)
  3. 3Ranking Service sorts the final results

5Booking Flow: Reservations

Instant Book vs Request to Book

Instant Book

The guest books immediately, the host does not confirm.

  • + Best UX for guests
  • + Higher conversion
  • - Risk for hosts
Request to Book

The host must confirm the booking.

  • + Control for hosts
  • - Delay for guests
  • - Lower conversion

Booking Process (Instant Book)

  1. 1Check availability: Atomic check + date locking (Redis SETNX or SELECT FOR UPDATE)
  2. 2Calculate price: Base price + cleaning fee + service fee + taxes
  3. 3Payment authorization: Stripe PaymentIntent (hold, not charge)
  4. 4Create reservation: Transaction: booking + update availability
  5. 5Notifications: Email/push to guest and host
  6. 6Payment capture: Charge after check-in (or 24h before)

Distributed Transactions

A reservation touches several services. The Saga pattern is used:

Saga: CreateBooking
├── Step 1: Reserve dates (Availability Service)
│   └── Compensate: Release dates
├── Step 2: Authorize payment (Payment Service)
│   └── Compensate: Cancel authorization
├── Step 3: Create booking (Booking Service)
│   └── Compensate: Delete booking
└── Step 4: Send notifications (Async, no compensate)

6Dynamic Pricing Engine

Price components

Host sets:
  • Base nightly rate
  • Weekend pricing
  • Weekly/monthly discounts
  • Cleaning fee
  • Extra guest fee
Airbnb adds:
  • Service fee (guest): ~14%
  • Service fee (host): ~3%
  • Occupancy taxes
  • Currency conversion

Smart Pricing (ML)

Airbnb offers hosts automatic pricing based on:

Demand signals:
  • Seasonality
  • Events in the city
  • Day of the week
Supply signals:
  • Occupancy rate
  • Lead time
  • Competitors
Listing signals:
  • Rating
  • Amenities
  • Photo quality

7Trust & Safety System

Two-way trust

For guests:
  • Verified photos
  • Reviews from other guests
  • Superhost badge
  • Airbnb Cover (insurance)
  • 24/7 support
For hosts:
  • ID verification
  • Guest reviews
  • Damage protection
  • Security deposit
  • Background checks

Fraud Detection

  • ML models: Detection of fake listings and suspicious bookings
  • Risk scoring: Each user and transaction receives a risk score
  • Message scanning: NLP for off-platform payments detection
  • Photo verification: CV to check whether the photo matches reality

Review System

Two-way feedback is the key to trust. Key mechanics:

  • Blind reviews: Both see reviews only after both have written
  • 14-day window: Limited time to write a review
  • Response: The host can respond to the review publicly

8High-Level architecture and standard scenarios

Architecture + Scenario Explorer

Discovery and booking paths for a two-sided marketplace

Discovery Plane (read heavy)

Guest App
search + filters
API Gateway
auth + routing
Search Service
geo-index query
Availability Read
calendar projection
Ranking Service
relevance + ML

Transaction Plane (consistency first)

Host Console
approve / update
API Gateway
auth + routing
Booking Orchestrator
saga workflow
Payment Service
auth / refund
Reservation Store
booking state
Inventory Lock
date lock / release
Notification
email / push / sms
The marketplace separates discovery and transactional paths: fast geo-search is isolated from the consistent booking path.
Select a scenario above to highlight the exact request-processing path through the architecture.

It's important to separate search read-path and booking write-path: discovery can be eventually consistent, while booking operations must go through a strict transactional path with locking and payment orchestration.

9Key interview points

✓ Be sure to discuss

  • Geo search: index selection (Geohash vs Quadtree vs S2)
  • Availability: how to synchronize with search
  • Double booking prevention: locking strategy
  • Two-sided marketplace: different UX for guest/host
  • Payment flow: authorization vs capture

💡 Additional topics

  • Smart Pricing ML model
  • Search ranking personalization
  • Photo storage and CDN
  • Internationalization (currencies, languages)
  • Experiences (not just accommodation)

Common interview mistakes

  • Forget about the two-way nature of the marketplace (guest + host flows)
  • Store availability in search index (changes too often)
  • Ignore timezone issues for calendar
  • Do not discuss trust & safety for the marketplace

Related chapters

Related chapters

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov