← Airbnb Interview Insights

Airbnb·Backend Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

System design round at Airbnb for a backend role, focused entirely on designing the search and booking infrastructure at scale. Pretty intense scope, they wanted ML integration and geo-sharding discussed on top of the core architecture, which I wasn't fully expecting.

Questions Asked (5)

Q1

Design the backend system powering Airbnb's home page, listing search, and availability/booking flow at scale.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is basically three problems jammed into one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then design each component (home page, search, booking) with scalability in mind, emphasizing trade-offs. Use a high-level architecture diagram and dive into critical parts like search indexing and booking consistency.

Pro tip: Explicitly call out the CAP theorem trade-offs for booking (consistency) vs. search (availability) and propose concrete solutions like distributed transactions or saga patterns. Also, mention how you'd handle peak loads (e.g., New Year's Eve) with caching and rate limiting.

1. Clarify Requirements

Ask about scale (DAU, listings, bookings per second), latency requirements, consistency needs, and read/write ratios. Confirm the scope: home page personalization, search filters, booking flow.

2. High-Level Architecture

Sketch a diagram with clients, load balancers, API gateways, microservices (user, listing, search, booking, payment), and data stores (SQL, NoSQL, cache, search index). Explain data flow for each feature.

3. Deep Dive: Search & Home Page

Design search using Elasticsearch with inverted indices, caching popular queries, and precomputed home page feeds. Discuss sharding, replication, and personalization via ML models.

4. Deep Dive: Booking & Availability

Ensure strong consistency for bookings using distributed transactions (e.g., 2PC) or saga pattern. Handle concurrency with optimistic locking or reservation systems. Discuss idempotency and payment integration.

5. Scalability & Trade-offs

Address scaling: database sharding, read replicas, caching layers (Redis), CDN for static assets, and message queues for async tasks. Discuss trade-offs: consistency vs. availability, latency vs. cost.

Key Points to Mention

  • Database sharding and replication strategies for listings and bookings
  • Use of Elasticsearch for search with geospatial queries and ranking
  • Caching strategies (Redis, CDN) for home page and popular searches
  • Consistency models: ACID for bookings, eventual consistency for search
  • Handling concurrency and double bookings with locking or reservation systems
  • Monitoring, alerting, and auto-scaling for peak traffic

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle cache invalidation when listing availability changes frequently?

System DesignTechnical Trade-offs
Author's notes

They asked this as a follow-up and I gave a write-through cache answer pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: how frequently availability changes, the acceptable staleness, and read/write patterns. Then propose a multi-layered caching strategy with appropriate invalidation mechanisms, such as short TTLs, event-driven invalidation, and versioning. Finally, discuss trade-offs between consistency, latency, and complexity, and how to handle edge cases like race conditions.

Pro tip: Emphasize that cache invalidation is not one-size-fits-all; propose a hybrid approach and discuss how you would monitor cache hit rates and staleness to iteratively improve. Showing awareness of Airbnb's scale and the need for eventual consistency will impress.

1. Clarify Requirements

Ask about the frequency of availability changes, the tolerance for stale data, and the read/write ratio. This determines the appropriate caching strategy.

2. Choose Caching Strategy

Propose a layered approach: use short TTLs for frequently changing data, and consider write-through or write-behind caching. For high consistency, use event-driven invalidation via a message queue.

3. Design Invalidation Mechanism

Detail how to invalidate: on write, publish an event to invalidate relevant cache entries. Use versioning or timestamps to avoid race conditions. Consider a pub/sub system like Kafka or Redis pub/sub.

4. Handle Edge Cases

Address scenarios like cache stampede, stale reads during invalidation, and network partitions. Suggest solutions like request coalescing, fallback to source, and idempotent invalidation.

5. Discuss Trade-offs and Monitoring

Compare consistency vs. latency vs. complexity. Explain how to monitor cache hit rate, invalidation lag, and staleness, and how to adjust TTLs based on metrics.

Key Points to Mention

  • Time-to-live (TTL) as a simple but effective invalidation method for frequently changing data.
  • Event-driven invalidation using a message queue (e.g., Kafka) to propagate changes to cache.
  • Cache versioning or timestamps to ensure consistency and avoid stale reads.
  • Handling cache stampede with request coalescing or locking.
  • Trade-offs between strong consistency and eventual consistency, and how to choose based on business needs.
  • Monitoring cache hit rate and invalidation lag to tune the system.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Walk through how you'd integrate ML-based personalized ranking into the search results pipeline.

System DesignA/B Testing & Experimentation
Author's notes

Honestly not my strongest area and it showed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the goal: to re-rank search results using ML models that predict personalized relevance. Then outline a high-level architecture that separates candidate generation from ranking, and describe how you'd integrate the model, handle feature serving, and run online experiments to validate improvements.

Pro tip: Emphasize the importance of a fallback mechanism and gradual rollout: start with a small percentage of traffic, monitor key metrics, and be ready to revert if the model degrades user experience.

1. Clarify Requirements and Constraints

Ask about scale, latency requirements, existing search infrastructure, and business metrics (e.g., bookings, engagement). Confirm that personalization should be based on user behavior and context.

2. Design the Ranking Pipeline

Propose a two-stage architecture: candidate generation (retrieve top N results via existing search) followed by ML-based ranking. The ranking model scores each candidate and reorders them.

3. Integrate the ML Model

Explain how to serve the model: offline training, feature store for real-time features, and a prediction service that the backend calls. Discuss model versioning and A/B testing infrastructure.

4. Handle Feature Engineering and Serving

Detail the features: user features (past bookings, clicks), listing features (price, location, amenities), and context features (time, device). Ensure low-latency feature retrieval and consistency between training and serving.

5. Experiment and Iterate

Describe how to run A/B tests: define success metrics, set up control and treatment groups, and analyze results. Plan for gradual rollout and monitoring for model drift.

Key Points to Mention

  • Two-stage architecture: candidate generation + ranking
  • Feature store for real-time feature serving
  • Model serving with low latency (e.g., using TensorFlow Serving or similar)
  • A/B testing framework and metrics (e.g., CTR, conversion rate)
  • Fallback to non-personalized ranking for cold-start users
  • Monitoring and retraining pipeline to handle model drift

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

What consistency model would you use for the availability and booking inventory service, and why?

System DesignTechnical Trade-offs
Author's notes

Strong consistency for booking, eventual for reads like browsing availability on a listing page.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: availability and booking inventory must be strongly consistent to prevent double bookings, but can tolerate some latency. Then propose a hybrid approach: strong consistency for writes (bookings) and eventual consistency for reads (availability displays), with appropriate mechanisms like distributed transactions or consensus protocols.

Pro tip: Acknowledge that strong consistency often comes with higher latency and lower availability, so discuss how to mitigate these trade-offs using techniques like caching with short TTLs or read replicas for non-critical reads.

1. Clarify Requirements

Ask about the specific needs: Is preventing double bookings critical? What are the latency and availability requirements? This shows you understand the business context.

2. Choose Consistency Model

Propose strong consistency for booking writes to avoid conflicts, and eventual consistency for availability reads to improve performance and scalability.

3. Explain Implementation

Describe how to achieve this: e.g., using a distributed database with strong consistency (like Spanner or CockroachDB) for bookings, and caching or read replicas for availability.

4. Address Trade-offs

Discuss the trade-offs: strong consistency may increase latency and reduce availability, but it's necessary for correctness. Mitigate with techniques like optimistic concurrency control or partitioning.

5. Consider Edge Cases

Mention handling of concurrent bookings, network partitions, and how to ensure idempotency to avoid duplicate bookings.

Key Points to Mention

  • Strong consistency for writes to prevent double bookings
  • Eventual consistency for reads to improve performance
  • Use of distributed transactions or consensus protocols (e.g., Paxos, Raft)
  • Caching strategies with short TTL for availability data
  • Partitioning and sharding to scale the inventory service
  • Idempotency and optimistic concurrency control to handle retries

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you structure A/B testing for ranking changes without polluting the experiment with network effects between users?

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Geo-based holdout was my answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that network effects are a major threat to A/B test validity in ranking systems, then propose a multi-layered strategy: use cluster-based randomization to isolate interference, combine with switchback or interleaving designs where appropriate, and validate with counterfactual metrics. Emphasize that the choice depends on the strength of network effects and the specific ranking context.

Pro tip: Mention that you would run a 'network effect sensitivity analysis' by comparing cluster-randomized results with user-randomized results to quantify interference, and use that to decide if more complex designs are needed.

1. Identify and quantify network effects

Analyze how users interact and whether ranking changes for one user can affect others (e.g., through shared content, social connections, or marketplace dynamics). Use historical data or simulations to estimate the potential bias.

2. Choose a randomization unit that minimizes interference

If network effects are strong, randomize at a cluster level (e.g., by geography, social graph communities, or listing groups) instead of by user. For weaker effects, consider switchback or interleaving designs.

3. Design the experiment with guardrails

Define primary and guardrail metrics, ensure sufficient power with cluster randomization, and pre-register analysis plans. Use techniques like CUPED or stratification to reduce variance.

4. Monitor and adjust for interference

During the experiment, track metrics that could indicate spillover (e.g., cross-cluster interactions). If interference is detected, consider post-hoc corrections or switch to a more robust design.

5. Validate and iterate

After the experiment, compare results with holdout groups or run follow-up tests to confirm findings. Use the learnings to refine future experiment designs.

Key Points to Mention

  • Cluster randomization (e.g., by geography, social graph, or listing clusters) to contain interference
  • Switchback experiments (time-based randomization) for marketplace settings with temporal network effects
  • Interleaving for ranking evaluations to reduce user-level noise and network effects
  • CUPED (Controlled-experiment Using Pre-Experiment Data) to increase sensitivity
  • Guardrail metrics and power analysis to ensure valid conclusions
  • Sensitivity analysis to quantify network effect bias and choose appropriate design

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.