← Airbnb Interview Insights

Airbnb·Backend Engineer·Onsite - Coding / Algorithms·Senior

Senior
Jun 2026

Summary

Code review round at Airbnb for a backend role. Three PRs of increasing difficulty, and they wanted you to go deep on architecture, correctness, concurrency, and whether you'd actually merge the thing.

Questions Asked (4)

Q1

Given a pull request, how would you critique its architecture and design at a high level, focusing on separation of concerns, layering, and API contracts?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This was the part I felt most comfortable with, but I still fumbled a bit by jumping straight into line-level stuff before stepping back.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by summarizing the PR's purpose and scope, then evaluate its architecture against separation of concerns, layering, and API contracts. Provide balanced feedback, highlighting strengths and suggesting improvements with concrete examples.

Pro tip: Frame your critique around maintainability, scalability, and team velocity—Airbnb values engineers who think about long-term system health and cross-team impact, not just code correctness.

1. Understand the PR's intent and context

Read the PR description, linked issues, and any design docs to grasp the problem being solved and constraints. This ensures your critique is relevant and aligned with business goals.

2. Assess separation of concerns

Check if responsibilities are clearly divided among modules, classes, or services. Look for signs of god objects, mixed concerns (e.g., business logic in controllers), and tight coupling.

3. Evaluate layering and boundaries

Verify that layers (e.g., presentation, domain, data) are respected and dependencies flow inward. Ensure that changes don't leak abstractions or bypass intended boundaries.

4. Review API contracts and interfaces

Examine public APIs, DTOs, and service interfaces for clarity, consistency, and backward compatibility. Check for proper versioning, error handling, and documentation.

5. Provide actionable feedback and trade-offs

Summarize findings, prioritize issues, and suggest concrete improvements. Discuss trade-offs (e.g., short-term speed vs. long-term maintainability) and ask clarifying questions.

Key Points to Mention

  • Single Responsibility Principle and avoiding god objects
  • Dependency inversion and clean architecture boundaries
  • API versioning, backward compatibility, and contract testing
  • Domain-driven design and bounded contexts
  • Observability, error handling, and idempotency in APIs
  • Trade-offs between consistency, availability, and performance

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

Q2

Looking at the same PR, identify any correctness issues: silent failures, swallowed exceptions, null returns where errors should propagate, or off-by-one bugs.

Technical Trade-offsRoot Cause Analysis
Author's notes

Spotted the swallowed exception pretty fast, but completely missed a null return that should've thrown.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Systematically scan the PR for error-handling anti-patterns by tracing each function's failure paths, then classify issues by severity and impact. For each finding, explain the root cause, the potential production consequence, and a concrete fix that aligns with the codebase's conventions.

Pro tip: Prioritize issues that could cause silent data corruption or inconsistent state over those that merely log poorly—interviewers at Airbnb care most about correctness and blast radius. Also, mention how you'd add tests or assertions to prevent regressions, showing you think beyond the immediate fix.

1. Map error propagation paths

Trace how errors flow through the changed code: identify every function call that can fail and check whether its error is returned, logged, or swallowed. Look for empty catch blocks, ignored return values, and default fallbacks that mask failures.

2. Inspect null/undefined handling

Check for null returns where an error should propagate, and for dereferences of potentially null values without guards. Verify that optional values are explicitly handled rather than silently defaulted.

3. Audit boundary conditions

Examine loops, array indexing, pagination, and arithmetic for off-by-one errors. Pay special attention to inclusive/exclusive bounds and empty-collection edge cases.

4. Assess impact and prioritize

For each issue, determine the worst-case production impact (e.g., data loss, incorrect responses, crashes) and rank them by severity. This shows you can distinguish critical bugs from minor style issues.

5. Propose fixes and prevention

Suggest concrete code changes (e.g., propagate errors, add validation, adjust loop bounds) and recommend tests or static analysis rules to catch similar issues in the future.

Key Points to Mention

  • Silent failures: empty catch blocks, logging without rethrowing, or returning default values on error.
  • Swallowed exceptions: catching broad exception types and ignoring them, or converting exceptions to boolean returns.
  • Null returns: returning null instead of throwing when a contract violation occurs, leading to NullPointerExceptions downstream.
  • Off-by-one bugs: incorrect loop bounds, fencepost errors in pagination or slicing, and inclusive/exclusive range mistakes.
  • Error propagation best practices: using Result types, checked exceptions, or explicit error returns; avoiding catch-all handlers.
  • Testing and observability: adding unit tests for failure paths and using logging/metrics to detect silent failures in production.

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

Q3

In the context of the PR, what concurrency issues can you identify? Think race conditions, missing locks, non-atomic check-then-act sequences, and shared mutable state.

System DesignTechnical Trade-offs
Author's notes

Hardest part of the whole round.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope of the PR and the concurrency model (e.g., threads, async tasks, distributed nodes). Then systematically scan the code for shared mutable state and check-then-act patterns, explaining how each could lead to race conditions or data corruption. Finally, propose concrete fixes such as locks, atomic operations, or immutability, and discuss trade-offs.

Pro tip: Don't just list issues—prioritize them by likelihood and impact, and suggest how to test for them (e.g., stress tests, race detectors). This shows you think about prevention, not just detection.

1. Clarify concurrency model and scope

Ask about the execution environment (threads, async, distributed) and the specific components in the PR. This ensures you focus on relevant concurrency issues.

2. Identify shared mutable state

Look for variables, objects, or resources accessed by multiple threads/tasks without synchronization. Note their scope and lifetime.

3. Analyze check-then-act sequences

Find patterns where a condition is checked and then acted upon without atomicity (e.g., if (map.containsKey(k)) map.put(k, v)). These are prime race condition candidates.

4. Evaluate existing synchronization

Check if locks, atomic variables, or other mechanisms are used correctly. Look for missing locks, lock ordering issues, or overly coarse locking.

5. Propose fixes and trade-offs

Suggest solutions like fine-grained locking, lock-free data structures, or immutability. Discuss performance, complexity, and correctness trade-offs.

Key Points to Mention

  • Race conditions due to unsynchronized access to shared mutable state
  • Non-atomic check-then-act sequences (e.g., lazy initialization, cache updates)
  • Missing or incorrect locking (e.g., lock not held during critical section, lock splitting)
  • Deadlocks from inconsistent lock ordering or nested locks
  • Use of thread-safe collections vs. manual synchronization
  • Atomicity and visibility issues (e.g., stale reads, lost updates)

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

Q4

Would you accept, request changes on, or reject this PR? Justify your decision with reference to testability and long-term maintainability.

Technical Trade-offsAdaptability & Ambiguity
Author's notes

Felt like the most open-ended part and I think I handled it okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the PR's purpose and scope, then evaluate it against testability and long-term maintainability criteria. Frame your decision as a trade-off between short-term velocity and long-term health, and propose concrete changes if needed.

Pro tip: Show that you consider the PR's impact on the team's future velocity and the cost of ownership, not just the code itself. Mention that you'd pair with the author to address concerns collaboratively.

1. Clarify the PR's context and goals

Ask about the problem it solves, the expected behavior, and any constraints. This ensures you understand the change before judging it.

2. Assess testability

Check if the code is easily testable: are there unit tests, integration tests, and clear interfaces? Identify any hard-to-test logic or missing coverage.

3. Evaluate long-term maintainability

Look for code clarity, modularity, documentation, and adherence to team conventions. Consider future changes and potential technical debt.

4. Decide and justify

Based on the assessment, choose to accept, request changes, or reject. Justify with specific examples related to testability and maintainability.

5. Propose actionable next steps

If requesting changes, suggest concrete improvements and offer to help. If accepting, note any follow-up work. If rejecting, explain why and suggest alternatives.

Key Points to Mention

  • Testability: unit tests, integration tests, dependency injection, mocking, and coverage metrics.
  • Maintainability: code readability, modularity, documentation, naming conventions, and complexity.
  • Trade-offs: balancing speed of delivery with long-term code health and team velocity.
  • Collaboration: how to give constructive feedback and work with the author to improve the PR.
  • Technical debt: identifying and addressing potential future issues early.
  • Team standards: adherence to style guides, design patterns, and architectural principles.

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