Distilled Prep
Distilled Prep — Airbnb — printed — distilledprep.com

Airbnb

New here? Start with the canon below — easiest first — then browse Fresh by interest.

Airbnb's marketplace has properties the ride/delivery platforms don't: inventory is unique (no two listings are interchangeable), transactions are high-stakes and infrequent, and trust between strangers is the product. That combination shapes everything they publish — search ranking where hosts can decline, experimentation with delayed outcomes, and fraud/trust systems.

For data scientists, their interviews draw on search and booking funnel diagnosis, two-sided experimentation with long feedback delays, and policy evaluation (their golden-age posts on experimentation and metrics remain canonical). For software engineers and MLEs, expect search/ranking system design and reservation-consistency problems (double-booking is their canonical correctness case).

Names worth recognizing: Airflow (born at Airbnb, now the industry's default workflow orchestrator), Chronon (their feature platform, successor to Zipline), and Bighead (their earlier ML platform).

Their vocabulary

Airflow

The workflow orchestrator born at Airbnb and now the industry default for data pipelines. Its DAG-of-tasks model is assumed vocabulary in their data engineering discussions.

Chronon

Airbnb's open-source feature platform (successor to Zipline): declares features once, computes them consistently for both training and online serving — their answer to train/serve skew in ML systems.

Fresh from their blog

Derived from recent posts, newest first.

MLE · DS ·

You run search ranking for a large travel marketplace. Your ranking model scores each listing independently and fills result positions top-to-bottom with the highest-scoring listings. Product intuition and business data both suggest the results are too homogeneous — guests with minority preferences (e.g., those who favor quality over price) are poorly served, and the overall mix of bookings skews heavily toward one segment.

Your task: redesign the ranking pipeline so that the full result page — not just the top listing — better serves the diversity of guest preferences, while protecting overall booking volume. Walk me through how you would train the diversity signal and how you would use it at serving time.

ML system design · search-ranking · recommendation · Jan 2023§
Practice against the follow-up probes
  • Before building anything, how do you confirm that the current results are actually too similar and that this similarity is causing worse outcomes — not just correlated with them?
  • Your training signal comes from guests who skipped the top result and booked something lower. What selection bias does that introduce, and how does it affect what the model learns?
  • At serving time, you discount each candidate's score by its similarity to already-placed results. What's the failure mode if that similarity discount is calibrated poorly — too high or too low?
  • How do you tune the trade-off between relevance and diversity without running a separate experiment for every possible weight?
  • Diversity gains might erode over time as the model's own outputs become training data. How do you detect and prevent that feedback loop?
Show answer guide

What the interviewer is probing

This question probes whether the candidate can separate the pointwise scoring problem from the set-selection problem and recognize that the two require different model architectures and different training regimes. Strong candidates must reason carefully about the selection bias baked into the training construction (skipped-then-booked implies dissimilarity, but only among a filtered population), the serving-time greedy sequential algorithm and its failure modes, and how to measure diversity outcomes without letting the diversity objective silently cannibalize relevance. The calibration and feedback-loop probes test decision quality and long-term system thinking.

Strong answer outline

  • Problem framing: Pointwise ranking maximizes expected booking probability per position independently; it implicitly assumes preferences are homogeneous and stationary. The real objective is maximizing utility of the set of results, which requires modeling inter-item relationships. This is a set-selection or submodular optimization problem.
  • Diversity signal — training data construction: Use logged sessions where a guest skipped the top result and booked from a lower position. The antecedent (top) listing represents what was passed over; the booked listing further down is the positive, and other skipped lower listings are negatives. The signal being taught: given that a guest rejected the antecedent, the booked listing was preferable in part because it was different. Selection bias to name: this population is not random — it excludes guests who booked the top result (majority), so the similarity model learns the preferences of the minority who wanted something different. That's actually desirable, but the candidate should state it explicitly.
  • Similarity model architecture: A pairwise neural network that takes (candidate listing, antecedent listing) and predicts a similarity score. Features: price bucket delta, listing type, location cluster, amenity overlap, bedroom count delta, photo style embeddings. Train by minimizing a ranking loss where the booked listing has (raw score − similarity to antecedent) > (not-booked score − similarity to antecedent).
  • Serving-time algorithm: Sequential greedy selection — position 1 gets highest raw relevance score; each subsequent position selects argmax over remaining candidates of (relevance score − λ × similarity to all already-placed listings). λ is a tunable hyperparameter controlling the diversity–relevance trade-off.
  • Calibration of λ: Don't tune per-experiment. Instead, treat λ as a business-level dial: fix it via offline simulation on held-out sessions, measuring distributional coverage of price tiers, listing types, and location clusters in results vs. in actual bookings. A/B test a small set of λ values; prefer the one that lifts booking value and quality metrics without degrading total bookings.
  • Metrics: Primary — uncancelled bookings (volume guardrail); secondary — booking value (proxy for quality mix shifting upward), 5-star review rate. Diversity diagnostic — distributional spread of booked price tier, listing type, location cluster across sessions in treatment vs. control. Don't let booking value become the optimization target directly.
  • Failure modes to name:
  • λ too high: high-relevance listings get suppressed; overall booking rate drops.
  • λ too low: no diversity effect; system degenerates to original pointwise ranker.
  • Feedback loop: if ranked outputs become training data, the model learns to reward diversity for its own sake, not because it reflects guest preference. Mitigate with a held-out logging policy (pure relevance ranker on a small traffic slice) to keep unbiased training data.
  • Greedy algorithm is not globally optimal for the set; for longer result pages, beam search or learned sequential policies are worth exploring at higher complexity.
  • Common wrong turns: Trying to inject diversity as a post-processing heuristic (e.g., rule-based price-tier quotas) rather than learning it from data; optimizing booking value as the primary metric rather than as a diagnostic.

The underlying concept

Standard pointwise and pairwise learning-to-rank models assign scores to items independently, which means the result set they produce is implicitly optimized for the modal guest preference — the majority principle. When the guest population is heterogeneous (a Pareto-distributed preference spread), the optimal set of results is one that covers the distribution, not one that packs the top preference into every slot. This is the core idea behind submodular set-selection and Maximal Marginal Relevance (MMR): each new item's marginal value is its relevance minus its redundancy with already-selected items. The key machine-learning insight is that the redundancy signal itself must be learned from behavior — specifically from sessions where guests reveal by their choices that they wanted something different from what was shown first — rather than engineered from feature overlap rules.

Source

Derived from Learning to rank diversely

DS ·

Your company runs hundreds of concurrent A/B experiments each week across dozens of product teams, each optimizing their own success metrics. A post-launch audit reveals that a team shipped a change that significantly degraded a key company-wide metric — one outside their purview — without anyone catching it before launch.

You've been asked to design a guardrail system that automatically flags experiments for review before they can ship, protecting the company's most important metrics without grinding experimentation to a halt.

How would you design this system? Focus on: what metrics you'd protect and how you'd decide when an experiment must escalate before launching.

Product case · experimentation · ab-testing · Jan 2021§
Practice against the follow-up probes
  • Walk me through how you'd choose which metrics belong in the guardrail set versus which stay as team-level success metrics.
  • A low-traffic experiment can't detect a 0.5% change with adequate power in a reasonable time. How does your system handle experiments that differ widely in traffic coverage?
  • There's a fundamental tension between catching real harm and generating noise that reviewers stop taking seriously. How do you operationalize that trade-off?
  • An experiment has a positive point estimate on the guardrail metric but hasn't run long enough to be well-powered. Should it be allowed to ship? Defend your answer.
  • Your escalation process is a bottleneck — reviewers are overwhelmed and teams are slowing down. What levers do you pull, and what are the risks of each?
Show answer guide
Also: ml-monitoring

What the interviewer is probing

This question probes metric judgment — can the candidate distinguish north-star guardrails from team-level OKRs and reason about false positive costs, not just false negatives? It also probes decision quality around the power-vs-sensitivity trade-off: a guardrail that's too tight stops everything; one that's too loose misses real harm. Strong candidates will surface the multiple-comparisons problem, the coverage-adjustment problem, and the organizational dynamics of escalation pipelines — not just describe a p-value threshold.

Strong answer outline

  • Metric selection — less is more: Guardrail metrics should be company-wide, not team-local. Good candidates: top-line revenue or bookings, core user experience indicators (latency, error rates, bounce), and a small number of strategic priorities. Resist the temptation to add every team's favorite metric — with k independent metrics each tested at α = 0.05, the experiment-level false alert rate approaches 1 − (0.95)^k fast, making the escalation queue unworkable.
  • Three layers of protection: A strong answer identifies that no single threshold handles all cases:
  • Magnitude guardrail: escalate if the point estimate is worse than a preset threshold (e.g., −0.5%), regardless of significance. Catches large harms even in noisy experiments.
  • Power guardrail: require the experiment to have run long enough that the magnitude guardrail is well-powered — i.e., if a harm of that size existed, you'd plausibly detect it. Underpowered experiments that show no harm aren't actually clean.
  • Statistical significance guardrail (applied selectively): for the highest-stakes metrics (e.g., revenue), even a small but statistically significant negative move should trigger review, because the dollar value of a small percentage is large.
  • Coverage adjustment: Experiments targeting a narrow audience (say, 5% of traffic) can't detect a 0.5% global effect — the metric is barely touched. Rather than holding all experiments to the same absolute threshold, scale the escalation threshold by coverage: low-coverage experiments get a wider per-unit tolerance but a tighter global-impact tolerance. This normalizes runtime requirements across experiments without letting small experiments escape accountability.
  • Automatic approvals to reduce noise: Not every technical trigger warrants a human review. Two sensible exemptions: (a) metrics where small movements are analytically significant but commercially immaterial — suppress the stat-sig guardrail and use only magnitude; (b) experiments with positive point estimates that haven't yet met the power requirement — allow launch if the confidence interval lower bound clears the threshold (a non-inferiority framing).
  • Setting thresholds — the art part: T (the escalation parameter) should be set as the larger of "what magnitude is worth a human's time to review" and "what magnitude is feasible to detect in a reasonable runtime." Too tight → experiments run forever or escalate constantly; too loose → real harm slips through. Backtest against historical experiments: what fraction would have been flagged, and of those, how many were genuine problems?
  • Organizational design: The escalation process itself is a system with throughput limits. The right answer includes who reviews escalations (cross-functional stakeholders, not just the running team), what the SLA is, and what happens when the queue backs up. Escalation should be a conversation, not a veto — the goal is transparency, not a launch block.
  • Common wrong turns: Setting thresholds purely on statistical grounds without asking "is this magnitude commercially meaningful?" Ignoring the multiple-comparisons inflation across guardrail metrics. Treating underpowered clean results as safe. Applying identical thresholds to 1%-coverage and 100%-coverage experiments.

The underlying concept

Guardrail systems are a structured answer to the multiple-objectives problem in large-scale experimentation: teams optimize local metrics, but a launch decision should be conditioned on the absence of meaningful harm to shared company metrics. The core statistical challenge is that 'no detected harm' and 'no harm' are different claims — one requires adequate power to be meaningful. The coverage-adjustment insight is that a metric's standard error scales with the fraction of total traffic included, so a fixed absolute threshold creates unequal runtime burdens; normalizing by coverage makes the power requirement consistent. The multiple-comparisons problem means each additional guardrail metric adds false-positive escalation probability, so metric selection is as much an organizational design decision as a statistical one — too many guardrails and reviewers become desensitized, too few and real harms go undetected.

Source

Derived from Designing Experimentation Guardrails

DS · MLE ·

You run a two-sided experiences marketplace — think cooking classes, surf lessons, guided tours. Your current search ranking model is a GBDT trained to maximize booking probability, and it's working well. A senior stakeholder argues that optimizing for bookings alone is shortsighted: guests who have a great experience are substantially more likely to rebook, so the model should be biased toward high-quality supply, even if that slightly depresses near-term bookings.

How would you decide whether to change the ranking objective, and if you do change it, how would you design and evaluate the experiment?

Product case · search-ranking · experimentation · Feb 2019§
Practice against the follow-up probes
  • Before touching the model, how do you define 'quality' in a way that's measurable and manipulation-resistant?
  • You plan to reweight training examples by quality tier. What are the failure modes of that approach compared to changing the loss function or adding a quality feature directly?
  • Your A/B test runs for two weeks and shows neutral bookings and a shift toward high-quality experiences. Is that enough to ship? What's missing from the readout?
  • The experiment is over. A host whose low-rated experience got demoted complains. How do you explain the ranking change to them, and does your answer change how you design the system?
  • A year later, your supply of high-quality experiences has grown because you promoted them — but your model's quality signal is now noisier because experiences have fewer reviews per slot of demand. What do you do?
Show answer guide

What the interviewer is probing

This question probes objective function design and the tension between a short-term proxy metric (bookings) and a long-term marketplace health metric (rebooking, quality). Strong candidates will define quality operationally, reason about label construction and leakage, design an experiment with a long enough horizon to capture rebooking effects, and articulate the supply-side feedback loop that makes this a sustained strategy decision rather than a one-time model tweak.

Strong answer outline

  • Define quality operationally before modeling it. Quality must be defined from data, not intuition. Candidates should propose a composite: review rating, review volume (to reduce noise on thin-review items), and structured post-experience feedback (e.g., 'better than expected'). Flag that rating alone is gameable and noisy at low count; volume thresholds matter.
  • Three implementation options, with trade-offs.
  • Add quality as a feature: cleanest; model learns the relationship from data; doesn't force a predetermined quality-booking trade-off. Risk: model may ignore it if bookings dominate the signal.
  • Reweight training examples by quality tier: directly shapes what the model optimizes; simpler to tune. Risk: arbitrary tier boundaries, potential cliff effects, model may learn to proxy quality via correlated features (price, category) rather than quality itself.
  • Change the label: replace binary booked/not-booked with a weighted outcome (e.g., booked × quality multiplier). Similar to reweighting but applied at label level; interacts with loss function. Risk: calibration breaks — model scores no longer approximate booking probability.
  • Label leakage is a real trap. Quality signals (post-trip reviews) are observed after the booking and stay. Training data construction must be careful: quality features used to reweight must come from the experience's historical reviews, not reviews generated by the training examples themselves.
  • Experiment design must include delayed outcomes. Near-term A/B readout: bookings (volume and quality distribution). But the core hypothesis — better experiences drive rebooking — has a 30-90 day delay. Design the experiment with a pre-registered secondary metric: rebooking rate of guests in treatment vs. control within 90 days. Without this, you can't actually validate the hypothesis.
  • Watch for supply-side effects. Demoting low-quality supply reduces their demand, potentially improving or worsening those experiences over time (fewer bookings means less revenue for the host to invest in improvement, or fewer reviews to escape cold start). Track quality distribution of the full supply, not just top-ranked items, to detect whether ranking is concentrating demand dangerously.
  • Decision rule. Ship if: (a) bookings are neutral or better, (b) quality distribution of bookings shifts toward high-quality tiers, (c) 90-day rebooking signal is directionally positive (even if underpowered). Hold if quality shift comes at a bookings cost that isn't recovered by rebooking gains within a defensible time window.
  • Common wrong turns. Treating AUC improvement in offline evaluation as sufficient validation. Running the experiment for too short a window to observe rebooking. Ignoring cold-start experiences that have no quality signal yet (they need a separate treatment, e.g., a quality-neutral score floor while accumulating reviews).

The underlying concept

Ranking objective design is fundamentally a question of which outcome you're willing to optimize as a proxy for long-term marketplace health. When you train on a short-term label (booking), you implicitly assume that all bookings are equally valuable — but in a marketplace where supplier quality drives repeat demand, that assumption is wrong. Reweighting training examples by outcome quality is the standard technique for introducing a richer objective without changing the model architecture: you're telling the optimizer that some positive examples matter more than others. The core risk is that quality labels are post-hoc (observed after the outcome you're trying to predict), so careful temporal discipline in training data construction is essential to avoid leakage. Finally, any supply-side ranking intervention creates feedback loops: demoting low-quality supply changes the demand those suppliers receive, which changes their future quality signals — a dynamic that offline experiments and short A/B tests cannot capture, making long-horizon monitoring a non-negotiable part of the launch decision.

Source

Derived from Machine Learning-Powered Search Ranking of Airbnb Experiences

DS · SWE ·

You're building the assignment layer for an A/B testing platform at a consumer marketplace. A colleague proposes a simple design: call get_treatment(user_id) to assign a user to a variant, then immediately log that assignment, and only afterward execute the variant-specific code path.

A senior engineer pushes back, saying this design will silently corrupt experiment results in production. What's the flaw they're pointing at, and how would you redesign the assignment and logging contract to prevent it?

Product case · experimentation · ab-testing · May 2014§
Practice against the follow-up probes
  • Walk me through a concrete scenario — not hypothetical — where the log fires but the user sees a different experience than what was logged.
  • Why is this class of bug particularly dangerous compared to, say, a metric being computed incorrectly?
  • How does your redesign prevent a well-meaning engineer who doesn't know about the experiment from introducing the same bias later?
  • Your redesign makes experiments more explicit in the code. What's the cost of that, and how do you mitigate it?
  • Suppose the variant-specific code path throws an exception after assignment is logged. What should happen to that log record?
Show answer guide

What the interviewer is probing

This question probes causal reasoning — specifically whether the candidate understands that logged assignment must be causally tied to actual exposure, not just to the assignment call. Strong candidates identify the check-then-act decoupling as the failure mode, articulate why silent mis-logging is worse than a crash (it produces biased estimates with no error signal), and reason about encapsulation as a correctness guarantee, not just an API taste. The follow-ups test whether they can think about error handling and the organizational dimension of keeping experiment integrity under ongoing code changes.

Strong answer outline

  • Name the flaw precisely: the bug is that logging and treatment delivery are decoupled. Any code between the log call and the rendered experience — a short-circuit conditional, a feature flag, a performance patch — can silently override the variant while the log records the original assignment. The user sees experience A; the log says B. This is exposure-logging contamination.
  • Why it's especially bad: unlike a computation error that produces noisy estimates, this produces systematically biased estimates — the contaminated segment (e.g., all Chinese users in the post's example) will show inflated or deflated treatment effects with no warning signal. The experiment appears to run cleanly.
  • Redesign principle — atomic deliver-and-log: the assignment, logging, and execution of the variant code path must be a single, indivisible call. The canonical pattern is a higher-order function (or callback/lambda): deliver_experiment(:name, control: -> { … }, treatment: -> { … }). The framework owns: (1) hashing the subject to a bucket, (2) recording the log, (3) immediately invoking only the correct lambda. No caller can interpose logic between steps 2 and 3 without touching the framework itself.
  • Encapsulation as a correctness guarantee: because the variant logic lives inside the lambda, any engineer who wants to change behavior for a subgroup (e.g., Chinese users) must either modify the lambda — which is visibly inside the experiment block — or modify the framework itself. Either action is auditable. The design makes bias hard to introduce accidentally.
  • Exception handling: if the variant lambda throws, the framework should catch, log the failure with the assignment record invalidated or flagged, fall back to a safe default, and not count that session in the analysis. Counting a failed delivery as a valid treatment observation is another form of the same contamination bug.
  • Common wrong turns: proposing logging at metric-collection time (too late; the user may not convert), proposing client-side deduplication (doesn't fix the causal gap), or treating this as purely a logging infrastructure problem rather than an API design problem.
  • Trade-off to name: the lambda/callback design is more verbose and requires experiment authors to reason about closures; the cost is worth it because the alternative trades ergonomics for silent correctness failures in production data.

The underlying concept

In controlled experiments, the unit of analysis is an exposure — a moment when a user actually experienced a specific variant. Logging must record exposures, not assignments, and those two things diverge whenever any logic can run between the assignment call and the rendered experience. The fix is encapsulation: binding the log emission and the variant execution into a single atomic operation so no external code can split them. This is a special case of the check-then-act race condition, except the damage is statistical rather than transactional — the experiment produces confidently wrong numbers rather than an obvious error. Because the bias is systematic (it affects a predictable subgroup, not random noise), it cannot be averaged away with more data.

Source

Derived from Experiment Reporting Framework

The canon

Curated questions on this company's enduring themes.

DS ·

Search-to-book conversion fell 15% in one destination market, but traffic and listing supply are stable. Lead the diagnosis.

Product case · search-ranking · marketplace-dynamics§
Practice against the follow-up probes
  • Walk me through the funnel you'd construct before touching any data.
  • Which segment cuts do you make first, and what would each reveal?
  • How do you distinguish a demand mix-shift from a product or supply problem?
  • What supply-side changes could cause this with listing count unchanged?
  • When do you stop diagnosing and escalate or act?
Show answer guide
Also: data-quality

What the interviewer is probing

Structured funnel decomposition under a one-market anomaly: does the candidate localize the drop to a funnel stage before hypothesizing, do they generate supply-side explanations that hide behind stable listing counts (availability, minimum stays, pricing, host responsiveness), and do they check for measurement artifacts before believing the behavior change? Airbnb's version of this question rewards knowing that "supply is stable" by count can conceal massive effective-supply changes.

Strong answer outline

  • First: verify the metric — instrumentation changes, bot traffic, definition changes, and comparison-window artifacts (holiday shift, event last year) explain a large share of single-market anomalies.
  • Localize in the funnel: query → results viewed → listing detail → booking request/instant book → acceptance → payment. A drop at detail-view→request implicates pricing/content; at request→acceptance implicates hosts; at results→detail implicates ranking or inventory match.
  • Demand mix: lead time, trip length, party size, domestic vs. international, device — a shift toward lower-converting segments (e.g., longer lead times after an event announcement) can move the aggregate with no product problem.
  • Effective supply despite stable counts: calendar availability for searched dates, minimum-stay rules, price increases, cleaning fees, host response time — all shrink bookable supply invisibly.
  • Cross-checks: did competitors or events change locally (regulation, festivals moving)? Compare similar markets as a synthetic control to see if the drop is market-specific.
  • Prioritize by expected information gain; timebox the diagnosis, and present findings as: funnel stage, segment, magnitude, candidate cause, recommended action or experiment.

The underlying concept

Funnel decomposition is diagnosis by conditional probabilities: overall conversion is a product of stage-wise rates, so a drop must live in identifiable factors — and localizing it first prevents hypothesis-shopping. The Airbnb-specific lesson is effective supply: in calendar-based marketplaces, supply is inventory × availability × constraints × price acceptability, and only the first term shows up in a listing count. Measurement artifacts outrank behavioral explanations in prior probability; check them first.

Source

Distilled Prep canon — curated from Airbnb's public work on search and booking funnel analytics.

Source: Airbnb engineering blog

DS ·

Design a policy and measurement plan for encouraging hosts to adopt Instant Book (guests book without host approval) without harming trust or marketplace quality.

Product case · causal-inference · experimentation§
Practice against the follow-up probes
  • Adoption is voluntary. Why does that break the obvious adopters-vs-non-adopters comparison, and what do you do instead?
  • What could go wrong for trust and quality, and which metrics catch it early?
  • Would you treat new hosts, professional hosts, and occasional hosts the same way?
  • What encouragement levers exist, and how do they differ analytically?
  • What would make you roll the program back?
Show answer guide
Also: marketplace-dynamics

What the interviewer is probing

Selection-bias instincts: hosts who opt into Instant Book differ systematically from those who don't (professionalism, availability discipline), so naive comparisons flatter the feature. Strong candidates reach for encouragement designs — randomize the nudge, not the adoption — and instrument the trust side (cancellations, incidents, reviews) as first-class outcomes, with policies differentiated by host segment.

Strong answer outline

  • Name the selection problem: adoption correlates with host quality; outcome gaps between adopters and non-adopters are not causal effects of the feature.
  • Encouragement design: randomize incentives/nudges (search boost, fee discount, education) at the host level; measure intent-to-treat effects, and use the randomized encouragement as an instrument for adoption if effect-on-adopters is needed. Cluster by market if ranking-boost nudges create within-market interference.
  • Outcome set: guest conversion and booking latency (the upside); host-cancellation rate, guest-reported incidents, review scores, support contacts, host churn (the trust guardrails). A host who accepts Instant Book but cancels often is worse than one who declines upfront.
  • Segment policies: professional hosts likely adopt with light nudges; occasional hosts may need protections (trip-type controls, guest-requirement filters) before adoption is healthy; brand-new hosts are the riskiest to auto-enroll — stage them.
  • Long-horizon monitoring: adoption changes the composition of bookings; track quality metrics per cohort over quarters, not weeks.
  • Rollback rule: pre-register thresholds on host-cancellation and incident rates by segment; the program pauses per-segment, not globally.

The underlying concept

When treatment is chosen rather than assigned, comparing the treated to the untreated measures who chooses, not what the treatment does. Encouragement designs recover causality by randomizing an upstream influence and analyzing intent-to-treat; instrumental-variable logic then scales that to the compliers. The marketplace twist is that adoption changes system composition — evaluation must include the counterparty's outcomes (guests, here) and run long enough for composition effects to surface.

Source

Distilled Prep canon — curated from Airbnb's public work on experimentation and policy evaluation.

Source: Airbnb engineering blog

SWE ·

Design a globally consistent availability and reservation system that makes double-booking a listing for overlapping dates impossible, while keeping search fast.

Systems design · distributed-systems · databases§
Practice against the follow-up probes
  • Two guests hit "book" for overlapping dates within 50 ms of each other. Walk me through exactly what happens.
  • How do you model availability for date ranges rather than single slots?
  • Payment authorization takes seconds and can fail. How does that interact with holding the dates?
  • Search reads availability millions of times per booking write. Do reads see the same truth as writes?
  • A region goes down mid-booking. What is the failure behavior?
Show answer guide
Also: reliability

What the interviewer is probing

Whether the candidate separates the one operation that needs strict serialization (committing a reservation) from the vast read traffic that doesn't, and can implement range-overlap exclusion correctly — naive check-then-insert is the classic race. Also probing the booking-payment interaction (holds with TTL, sagas) and honest consistency reasoning across regions.

Strong answer outline

  • Correctness core: per-listing serialization of reservation commits. Implementations: transactional insert with an exclusion constraint on (listing, date-range overlap) — e.g., per-day rows with unique (listing, date) keys inserted atomically, or a range-exclusion constraint; alternatively optimistic concurrency on a per-listing calendar version. The invariant lives in the database, not application logic.
  • The 50 ms race: both requests attempt the atomic commit; exactly one succeeds, the other receives a clean conflict and re-searches. Correctness does not depend on timing.
  • Payment interaction: two-phase flow — place a short-TTL hold on the dates (same exclusion mechanics), authorize payment, then confirm; expiry or payment failure releases the hold automatically. Idempotency keys on the whole flow make client retries safe.
  • Read path: search reads eventually consistent replicas/caches of availability (staleness measured in seconds is acceptable — the commit step re-verifies), so search scale never touches the serialized path. Final availability check happens inside the booking transaction.
  • Multi-region: home each listing's calendar to one region (ownership by geography) so commits are single-region strongly consistent; replicate asynchronously for reads. Cross-region failover promotes ownership with fencing to prevent split-brain double-commits.
  • Degraded modes: if the owning region is down, fail bookings for its listings (correctness over availability for money+inventory) while search continues on stale reads.

The underlying concept

Inventory systems are exclusion problems: the invariant "no two confirmed reservations overlap" must be enforced where atomicity actually exists — a transactional store with constraints — because any check-then-act sequence outside it races. The scalable pattern is asymmetric consistency: strong consistency on the narrow write path, eventual consistency on the wide read path, with the write path re-validating what stale reads promised. Holds-with-TTL are the standard bridge between instantaneous inventory locks and slow external side effects like payment.

Source

Distilled Prep canon — curated from Airbnb's public work on reservation and payments infrastructure.

Source: Airbnb engineering blog

DS ·

Search ranking is changed to favor listings with a higher predicted probability of host acceptance. How would you evaluate whether this change should launch?

Product case · search-ranking · experimentation§
Practice against the follow-up probes
  • What defines success here — for guests, hosts, and the marketplace — beyond bookings?
  • How do you separate ranking relevance from host availability and acceptance behavior?
  • Position bias, delayed outcomes, cancellations: how does each contaminate your readout?
  • Boosting likely-accepting hosts changes which hosts get demand. What long-term effects does that create, and how would you detect them?
  • Would you randomize by guest, by search, or something else? Why?
Show answer guide
Also: marketplace-dynamics

What the interviewer is probing

Whether the candidate sees that this ranking change optimizes a transaction probability, not relevance — and that doing so redistributes demand among hosts, which can reshape the supply side over time. Strong candidates define a guest metric (successful, completed stays — not clicks), a host-side metric (demand concentration, new-host exposure), and a marketplace metric, and they handle the long feedback delays that make booking experiments slow.

Strong answer outline

  • Success definition: guest side — booking conversion and completed, well-reviewed stays (an accepted booking that cancels later is not success); host side — acceptance rate, distribution of bookings across hosts, new-listing exposure; marketplace — total completed nights and rebooking rates.
  • Decompose the mechanism: the change can win by (a) genuinely reducing guest effort wasted on requests that get declined, or (b) merely shifting exposure to instant-book/professional hosts. Same topline, very different long-term marketplace.
  • Experiment design: randomize by guest (searcher), stratify by market; measure through the full funnel — search → request → acceptance → booking → completed stay — with a window long enough for stays to complete; expect weeks, and pre-register leading indicators.
  • Confounds to name: position bias (boosted listings get clicks by position alone — consider counterfactual logging or position-adjusted metrics); seasonality by market; cancellation lag.
  • Long-term supply effects: run a host-side holdout or monitor demand concentration (e.g., share of bookings to top-decile hosts) and new-host cold-start success; a rich-get-richer loop is the main strategic risk.
  • Decision rule: launch if guest success improves without measurable harm to new-host exposure; if concentration worsens, pair the ranking change with an exploration floor for new listings.

The underlying concept

Ranking by predicted transaction success is optimizing a composite outcome: relevance times counterparty behavior. The moment counterparty behavior enters the objective, ranking becomes a market intervention — it allocates demand, and suppliers respond to the allocation. This is the two-sided version of Goodhart's law: boosting what converts today reshapes tomorrow's supply, so evaluations must include distributional metrics and exploration guarantees, not just average conversion.

Source

Distilled Prep canon — curated from Airbnb's public work on search ranking and marketplace experimentation.

Source: Airbnb engineering blog