← Airbnb Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Airbnb for a software engineer role, focused entirely on designing a booking system end to end. Pretty intense scope for a single session.

Questions Asked (4)

Q1

Design a booking system (like for hotels or flights). Walk through functional requirements, data model, concurrency handling, and overall architecture.

System DesignTechnical Trade-offsData Modeling
Author's notes

This was the whole interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then propose a high-level architecture and data model. Dive into concurrency control for booking to prevent double-booking, and discuss trade-offs. Conclude with scalability and reliability considerations.

Pro tip: Emphasize idempotency and distributed locking to handle concurrent bookings, and discuss how to handle failures gracefully with retries and compensating transactions. This shows you understand real-world production challenges.

1. Clarify Requirements

Ask questions to understand scope: What types of bookings (hotels, flights)? What scale? What are the consistency and availability requirements? Are there search, payment, and notification components?

2. High-Level Design

Sketch the main components: API gateway, booking service, inventory service, payment service, notification service, and databases. Discuss how they interact and the overall flow.

3. Data Model

Define core entities: User, Property/Flight, Room/Seat, Booking, Payment. Describe relationships and key attributes. Discuss SQL vs NoSQL choices and indexing for search.

4. Concurrency and Consistency

Explain how to prevent double-booking using techniques like optimistic locking, pessimistic locking, or distributed locks. Discuss transaction isolation levels and idempotency keys.

5. Scalability and Reliability

Address scaling reads/writes, caching, sharding, and handling failures with retries, circuit breakers, and compensating transactions. Discuss monitoring and alerting.

Key Points to Mention

  • Idempotency keys to ensure duplicate booking requests don't create multiple reservations.
  • Optimistic vs pessimistic locking trade-offs for concurrency control.
  • Database sharding and replication strategies for scalability.
  • Caching strategies for search and availability queries.
  • Handling payment failures and compensating transactions (Saga pattern).
  • CAP theorem trade-offs and eventual consistency for availability.

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

Q2

How do you prevent double-booking under high concurrency? What are the tradeoffs between your options?

System DesignTechnical Trade-offs
Author's notes

They zeroed in on this after I glossed over it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario (e.g., booking a listing, seat, or resource) and the consistency requirements. Then present a layered approach: from optimistic concurrency control to pessimistic locking to distributed locks, and discuss tradeoffs in terms of consistency, latency, scalability, and complexity. Conclude with a recommendation based on the specific constraints of the system.

Pro tip: Emphasize that the best solution depends on the specific use case—there's no one-size-fits-all. Mention that Airbnb likely uses a combination of techniques, such as database transactions with unique constraints for critical sections and distributed locks for cross-service coordination, and that idempotency keys are essential to handle retries safely.

1. Clarify Requirements and Constraints

Ask about the scale, consistency needs (strong vs. eventual), latency tolerance, and whether the booking is within a single database or across services. This sets the context for choosing the right approach.

2. Outline Core Strategies

Present the main options: optimistic concurrency control (e.g., version numbers or conditional writes), pessimistic locking (e.g., SELECT FOR UPDATE), and distributed locks (e.g., Redis, ZooKeeper). Briefly explain how each prevents double-booking.

3. Analyze Tradeoffs

Compare the strategies on consistency, performance, scalability, and complexity. For example, optimistic locking is simple but can cause high contention and retries; pessimistic locking ensures strong consistency but hurts throughput; distributed locks add complexity and potential single points of failure.

4. Recommend a Solution

Propose a hybrid or specific approach based on the clarified requirements. For instance, use database transactions with unique constraints for critical sections, and idempotency keys to handle retries. Mention that for high concurrency, you might shard or partition to reduce contention.

5. Address Edge Cases and Failure Modes

Discuss how to handle lock timeouts, deadlocks, network partitions, and retries. Emphasize the importance of idempotency and monitoring to detect and resolve double-booking incidents.

Key Points to Mention

  • Optimistic concurrency control (version numbers, conditional writes) and its tradeoff of retries under contention.
  • Pessimistic locking (SELECT FOR UPDATE, row-level locks) and its impact on throughput and deadlock potential.
  • Distributed locks (Redis Redlock, ZooKeeper) and their complexity, fault tolerance, and consistency guarantees.
  • Database unique constraints and transactions as a simple, reliable way to prevent double-booking.
  • Idempotency keys to ensure retries don't cause duplicate bookings.
  • Sharding or partitioning to reduce contention and scale horizontally.

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

Q3

How would you design the payment workflow to be idempotent and handle failures gracefully?

System DesignAPI & Integrations
Author's notes

Talked about idempotency keys and retry logic.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining idempotency in the context of payment workflows, emphasizing the use of idempotency keys to ensure duplicate requests don't result in multiple charges. Then, outline a robust failure handling strategy that includes retries with exponential backoff, circuit breakers, and a dead-letter queue for manual intervention. Finally, discuss how to maintain consistency across distributed systems using transactional outbox patterns and idempotent consumers.

Pro tip: Mention that idempotency keys should be generated client-side and stored server-side with a unique constraint, and that you'd use a database transaction to atomically record the key and process the payment. Also, highlight the importance of monitoring and alerting on idempotency key collisions and failure rates to detect issues early.

1. Define Idempotency and Scope

Explain what idempotency means for payment APIs: multiple identical requests should have the same effect as a single request. Clarify that this applies to both client-initiated retries and internal retries.

2. Design Idempotency Key Mechanism

Describe how clients generate a unique idempotency key (e.g., UUID) and include it in the request header. The server stores the key with the payment result in a database with a unique constraint to prevent duplicate processing.

3. Implement Failure Handling Strategies

Outline retry policies with exponential backoff and jitter, circuit breakers to avoid overwhelming downstream services, and timeouts. For unrecoverable failures, use a dead-letter queue for manual review.

4. Ensure Consistency Across Services

Discuss patterns like transactional outbox to atomically update the database and publish events, and idempotent consumers to handle duplicate messages in asynchronous workflows.

5. Monitor and Reconcile

Explain the need for monitoring idempotency key usage, failure rates, and reconciliation jobs to detect and resolve inconsistencies between payment states and external systems.

Key Points to Mention

  • Idempotency keys: client-generated unique identifiers to deduplicate requests.
  • Database unique constraint on idempotency key to prevent duplicate processing.
  • Retry mechanisms with exponential backoff and jitter to handle transient failures.
  • Circuit breakers and timeouts to prevent cascading failures.
  • Dead-letter queues for failed payments requiring manual intervention.
  • Transactional outbox pattern for atomicity between database updates and event publishing.
  • Idempotent consumers for handling duplicate messages in event-driven architectures.
  • Monitoring and alerting on idempotency key collisions and failure rates.

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

Q4

How would you keep search results low-latency while maintaining strong consistency on inventory?

System DesignTechnical Trade-offs
Author's notes

I suggested caching the search layer and using CDC to propagate changes into a search index asynchronously.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what latency target, what consistency level (strong vs. eventual), and what scale. Then propose a hybrid architecture that separates the read path (optimized for low latency) from the write path (ensuring strong consistency), using techniques like caching with invalidation, read-your-writes, and possibly a consensus protocol for critical writes.

Pro tip: Acknowledge the inherent trade-off between latency and strong consistency (CAP theorem), and propose a pragmatic solution that relaxes consistency only where it's safe (e.g., search results) while enforcing it for inventory updates. This shows you understand business needs, not just theory.

1. Clarify Requirements and Constraints

Ask about expected read/write throughput, latency SLA, consistency requirements (e.g., is it okay if a user sees stale inventory for a few seconds?), and failure tolerance.

2. Design the Write Path for Strong Consistency

Use a consensus-based system (e.g., Raft, Paxos) or a strongly consistent database (e.g., Spanner, CockroachDB) for inventory updates to ensure linearizability.

3. Optimize the Read Path for Low Latency

Serve search results from a cache or read replica, but ensure it's updated in near real-time via change data capture (CDC) or invalidation messages from the write path.

4. Handle Consistency Guarantees for Reads

Implement read-your-writes consistency for users who just made a booking, and use versioning or timestamps to detect and resolve stale reads.

5. Monitor and Iterate

Set up metrics for latency and consistency violations, and be prepared to adjust the trade-off (e.g., increase cache TTL or add more replicas) based on observed behavior.

Key Points to Mention

  • CAP theorem and the trade-off between consistency and latency
  • Use of caching (e.g., Redis, Memcached) with appropriate invalidation strategies
  • Change Data Capture (CDC) to propagate updates to read replicas/caches
  • Consensus algorithms (Raft, Paxos) for strong consistency in the write path
  • Read-your-writes consistency for user experience
  • Monitoring and alerting for consistency violations and latency spikes

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