Airbnb Search & Availability Architecture
Geo-search, ML ranking, and real-time availability at scale
Key Insight
Search quality compounds: a 1% improvement in ranking relevance drives measurable booking revenue increases.
Request Journey
How It Works
โ 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
โฅ 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
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.
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.
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.
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.
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.
- Q1
Design a search system for a vacation rental marketplace. How would you handle availability that changes in real-time?
- Q2
Explain the trade-offs between a single heavyweight ranking model vs a multi-stage retrieval-then-ranking pipeline.
- Q3
How would you build a feature store that serves ML features with sub-5ms latency and guarantees consistency between training and serving?
- Q4
A listing is booked between when search results are generated and when the user clicks. How do you handle this race condition?
- 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
Applying Deep Learning To Airbnb Search
Haldar, M. et al. (Airbnb)
Listen to the Podcast Episode
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 EpisodeFree ยท No account required ยท Listen in browser
More Distributed Systems
View allNetflix Content Delivery Architecture
How Netflix streams to 260M users without a single datacenter
Netflix ยท Disney+ ยท Hulu
Twitter Fan-Out & Timeline Architecture
The push vs pull dilemma at 500M tweets/day
X (Twitter) ยท Instagram ยท LinkedIn
Uber Surge Pricing & Geospatial Architecture
H3 hexagonal indexing, real-time dispatch, and dynamic pricing
Uber ยท Lyft ยท DoorDash
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