HomeArchitecturesAirbnb Search & Availability Architecture
โšก Distributed SystemsAdvancedWeek 4

Airbnb Search & Availability Architecture

Geo-search, ML ranking, and real-time availability at scale

AirbnbBooking.comExpedia

Key Insight

Search quality compounds: a 1% improvement in ranking relevance drives measurable booking revenue increases.

Request Journey

Guest enters dates and locationโ†’
Geo query hits Elasticsearch indexโ†’
Filter by available dates from calendar DBโ†’
ML model predicts optimal priceโ†’
Ranking model scores listings by relevance
+1 more steps

How It Works

1

โ‘  Guest enters dates and location

2

โ‘ก Geo query hits Elasticsearch index

3

โ‘ข Filter by available dates from calendar DB

4

โ‘ฃ ML model predicts optimal price

5

โ‘ค Ranking model scores listings by relevance

6

โ‘ฅ Top 20 results returned to guest

โš The Problem

Airbnb must search millions of listingsacross complex, overlapping constraints: geographic location, date availability, price range, amenities, guest count, and host preferences. Unlike product search, each listing has a unique real-time availability calendar that changes constantly as bookings are made. A stale search result that shows an already-booked listing degrades trust. Ranking must balance relevance, personalization, and business metrics like conversion rate and revenue per search.

โœ“The Solution

Airbnb's search stack combines Elasticsearch for geo-spatial candidate retrieval with a multi-stage ML ranking pipeline. The first stage retrieves thousands of candidates using geo_distance and filter queries. A lightweight model prunes candidates, then a heavyweight neural model re-ranks the top results using 1,000+ features from a real-time feature store. Availability is checked against a dedicated calendar service with sub-second consistency, ensuring displayed listings are actually bookable.

๐Ÿ“ŠScale at a Glance

7M+

Active Listings

Hundreds of Millions

Searches/Day

1,000+

Ranking Features

~5โ€“7%

Booking Conversion

๐Ÿ”ฌDeep Dive

1

Elasticsearch Geo-Spatial Retrieval

The first search stage uses Elasticsearch with geo_distance queries to find listings within the user's map viewport or search radius. Elasticsearch indexes listings with their latitude/longitude, enabling efficient bounding-box and geo-distance filtering. Additional hard filters (price range, guest count, property type, dates) are applied as Elasticsearch query clauses to prune the candidate set from millions to a few thousand. The Elasticsearch cluster is sharded by geographic region, with replicas for both fault tolerance and read throughput. Index updates propagate within seconds when hosts modify listings.

2

Multi-Stage ML Ranking Pipeline

After candidate retrieval, Airbnb applies a multi-stage ranking pipeline. The first stage is a lightweight model (gradient-boosted decision tree) that scores thousands of candidates in under 10ms. The second stage is a deep neural network that re-ranks the top ~100 candidates using 1,000+ features including listing quality signals, personalization features (user search history, saved listings), and business objectives (conversion probability, revenue potential). This two-stage approach balances computational cost with ranking quality โ€” the expensive neural model only scores the most promising candidates.

3

Real-Time Feature Store for ML Serving

The ranking models consume features from Airbnb's centralized feature store, which serves both real-time and precomputed features with sub-5ms latency. Real-time features include the user's current session behavior (clicks, views, filters applied), listing-level signals (recent booking rate, response time), and contextual features (time of day, device type, trip purpose). Precomputed features โ€” like a listing's historical conversion rate and average review score โ€” are updated via batch pipelines and cached in a low-latency key-value store. The feature store ensures training/serving consistency, preventing training-serving skew.

4

Availability Calendar Service

Each listing has a real-time availability calendar that reflects the host's blocked dates, existing reservations, minimum stay requirements, and pricing rules. The calendar service is a dedicated microservice backed by a strongly-consistent database โ€” showing an unavailable listing in search results wastes user attention and erodes trust. When a booking is confirmed, the calendar is updated synchronously before the booking confirmation is returned. Search results are cross-referenced against the calendar service after ranking, filtering out any listings that became unavailable between indexing and query time.

5

Search Ranking Optimization via A/B Testing

Airbnb runs hundreds of concurrent A/B experiments on search ranking. The primary metric is 'bookings per search' but the team also tracks downstream metrics like guest satisfaction, host earnings, and long-term retention. Each experiment modifies a specific aspect of the ranking pipeline โ€” feature weights, model architecture, diversity injection rules, or business objective weightings. Interleaving experiments (showing results from two models alternately within the same search) provide faster signal than traditional A/B splits. A 1% improvement in search relevance translates to measurable revenue impact at Airbnb's scale.

โฌกArchitecture Diagram

Airbnb Search & Availability Architecture โ€” simplified architecture overview

โœฆCore Concepts

๐Ÿ”

Elasticsearch

๐ŸŒ

Geo-Distance Search

โš™๏ธ

Feature Store

๐Ÿง 

ML Ranking

๐Ÿง 

Real-time Availability

โš™๏ธ

Druid Analytics

โš–Tradeoffs & Design Decisions

Every architectural decision is a tradeoff. Here's what you gain and what you give up.

โœ“ Strengths

  • โœ“Multi-stage ranking balances computational cost with result quality
  • โœ“Real-time feature store ensures sub-5ms feature serving with training-serving consistency
  • โœ“Elasticsearch geo-spatial queries efficiently prune millions of listings to thousands of candidates
  • โœ“Dedicated calendar service prevents showing unavailable listings in search results

โœ— Weaknesses

  • โœ—Real-time availability checking adds latency to every search request
  • โœ—1,000+ feature models are complex to debug when ranking quality degrades
  • โœ—Elasticsearch index updates have a propagation delay, creating brief staleness windows
  • โœ—A/B testing infrastructure is expensive and experiment interactions can produce misleading results

๐ŸŽฏFAANG Interview Questions

Interview Prep

๐Ÿ’ก These questions appear in FAANG system design rounds. Focus on tradeoffs, not just what the system does.

These are real system design interview questions asked at Google, Meta, Amazon, Apple, Netflix, and Microsoft. Study the architecture above before attempting.

  1. Q1

    Design a search system for a vacation rental marketplace. How would you handle availability that changes in real-time?

  2. Q2

    Explain the trade-offs between a single heavyweight ranking model vs a multi-stage retrieval-then-ranking pipeline.

  3. Q3

    How would you build a feature store that serves ML features with sub-5ms latency and guarantees consistency between training and serving?

  4. Q4

    A listing is booked between when search results are generated and when the user clicks. How do you handle this race condition?

  5. Q5

    How would you measure whether a change to search ranking actually improves the user experience? What metrics would you track?

Research Papers & Further Reading

2019

Applying Deep Learning To Airbnb Search

Haldar, M. et al. (Airbnb)

Read

Listen to the Podcast Episode

๐ŸŽ™๏ธ Free Podcast

Alex & Sam break it down

Listen to a conversational deep-dive on this architecture โ€” real trade-offs, production context, and student-friendly explanations. Free, no login required.

Listen to Episode

Free ยท No account required ยท Listen in browser

More Distributed Systems

View all
๐ŸŽ™๏ธ Podcast ยท All Free

Listen to more architecture deep-dives

30 free podcast episodes โ€” Alex & Sam break down every architecture in this library. Listen in your browser, no account needed.

All architecture articles are free ยท No account needed