← Airbnb Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Airbnb system design round focused entirely on building a group chat backend, the kind of thing you'd see in their host-guest messaging product. Covered a lot of ground: storage, real-time delivery, unread counts, the whole thing. Felt like a reasonable interview but there were a few moments where I got lost in the weeds.

Questions Asked (9)

Q1

Design the backend for a real-time group chat system supporting multi-party conversations, message history, and unread counts at scale.

System DesignTechnical Trade-offs
Author's notes

This is a big one and I underestimated how much the interviewer wanted me to decompose it upfront.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of concurrent users, message throughput, latency targets, consistency needs). Then design a high-level architecture covering message flow, storage, and real-time delivery, and dive into key components like partitioning, fan-out, and unread count management. Discuss trade-offs and justify your choices.

Pro tip: Focus on the unique challenges of group chat: fan-out to many recipients and maintaining unread counts efficiently. Propose a hybrid approach (e.g., push for small groups, pull for large) and explain how you'd handle message ordering and idempotency.

1. Clarify Requirements and Scale

Ask about expected number of users, groups, messages per second, latency requirements, and consistency guarantees. Define functional and non-functional requirements.

2. High-Level Architecture

Sketch the main components: clients, gateways, chat service, message queue, storage, and presence service. Explain how messages flow from sender to recipients.

3. Data Model and Storage

Design schemas for messages, conversations, and user-conversation mappings. Choose databases (e.g., Cassandra for messages, Redis for unread counts) and explain partitioning and indexing strategies.

4. Real-Time Delivery and Fan-Out

Detail how to deliver messages in real-time using WebSockets or long polling. Discuss fan-out strategies (push vs. pull) and how to handle large groups efficiently.

5. Unread Counts and Scalability

Explain how to maintain unread counts per user per conversation, using counters and read receipts. Address scalability, fault tolerance, and trade-offs.

Key Points to Mention

  • Message ordering and idempotency: use sequence numbers or timestamps, and deduplication to handle retries.
  • Fan-out strategies: push for small groups, pull for large groups; consider hybrid approaches.
  • Storage choices: wide-column store (Cassandra) for messages, Redis for unread counts and presence.
  • Unread count management: increment on new message, reset on read; use atomic counters and periodic reconciliation.
  • Real-time transport: WebSockets for bidirectional communication, with fallback to long polling.
  • Scalability and partitioning: shard by conversation ID or user ID, use consistent hashing, and handle hot partitions.

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

Q2

What clarifying questions would you ask before designing a group chat system, and how do the answers change your design?

System DesignAdaptability & Ambiguity
Author's notes

I asked about group size limits and got partial credit for that.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that clarifying questions are essential to scope the problem and avoid over-engineering. Then, walk through the key dimensions of a group chat system (scale, features, consistency, etc.), explaining how each answer would pivot your design decisions. Emphasize that you would prioritize questions based on impact and iterate as you learn more.

Pro tip: Frame your clarifying questions around the product's core value proposition—e.g., 'Is this for real-time coordination or asynchronous communication?'—because at Airbnb, design decisions should always tie back to user needs and business goals.

1. Identify Core Functional Requirements

Ask about the primary use case: Is it for 1:1 messaging, small groups, or large communities? What features are must-have (e.g., message history, read receipts, media sharing)?

2. Clarify Scale and Performance Needs

Determine expected user base, concurrent users, message volume, and latency requirements. This drives decisions on architecture (e.g., monolithic vs. microservices) and storage.

3. Explore Consistency and Reliability Trade-offs

Ask about message ordering, delivery guarantees (at-least-once vs. exactly-once), and offline support. These affect choices like using WebSockets vs. polling, and database consistency models.

4. Understand Security and Compliance Constraints

Inquire about encryption, data retention policies, and moderation needs. This influences design around authentication, authorization, and storage.

5. Adapt Design Based on Answers

Summarize how each answer would change your design: e.g., if scale is small, a simple client-server with a relational DB suffices; if large, consider sharding, pub/sub, and CDN for media.

Key Points to Mention

  • The importance of clarifying questions to avoid assumptions and scope creep.
  • How scale (users, messages) impacts architecture: from monolithic to distributed systems.
  • Trade-offs between consistency and availability (CAP theorem) in message delivery.
  • Real-time vs. asynchronous communication: WebSockets, long polling, or push notifications.
  • Data storage choices: SQL vs. NoSQL, and how to handle message history and search.
  • Security considerations: end-to-end encryption, access control, and compliance (GDPR).

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

Q3

Walk through the data model for a chat system and explain how you'd guarantee message ordering within a conversation.

Data ModelingSystem Design
Author's notes

I went with wall-clock timestamps initially and the interviewer pushed back immediately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the core entities (User, Conversation, Message, Participant) and their relationships, then dive into the message ordering challenge. Explain how you'd use a monotonic sequence per conversation and discuss the trade-offs between server-assigned timestamps, client-generated IDs, and distributed sequence generators. Finally, describe how the client and server collaborate to ensure messages are displayed in the correct order, even with network delays or concurrent sends.

Pro tip: Acknowledge that perfect global ordering is impossible in distributed systems, but per-conversation ordering can be guaranteed with a single writer or a consensus protocol. Mention that Airbnb likely uses a sharded architecture, so you'd shard by conversation ID to keep ordering local and scalable.

1. Define the data model

List the main entities: User, Conversation, Message, and Participant. Describe key fields (e.g., Message has conversation_id, sender_id, content, sequence_number, timestamp) and relationships (one conversation has many messages, many users).

2. Identify ordering requirements

Explain that messages within a conversation must be totally ordered, but ordering across conversations is not required. Discuss the need for a consistent order that all participants agree on, even with concurrent sends.

3. Choose an ordering mechanism

Propose a per-conversation monotonic sequence number assigned by a single authority (e.g., a dedicated service or the database). Compare alternatives like Lamport timestamps, vector clocks, or client-side sequence numbers with server reconciliation.

4. Handle concurrency and failures

Describe how to handle simultaneous sends: use optimistic concurrency or a queue per conversation. Discuss failure scenarios (e.g., network partitions) and how to ensure the sequence remains consistent (e.g., via consensus or idempotent writes).

5. Client-side ordering and display

Explain how clients use the sequence number to order messages, handle out-of-order delivery, and reconcile local optimistic messages with server-assigned sequence numbers.

Key Points to Mention

  • Sharding by conversation ID to localize ordering and scale horizontally
  • Using a monotonic sequence number per conversation, assigned by a single writer or consensus group
  • Trade-offs between server-assigned timestamps and client-generated IDs (clock skew, causality)
  • Idempotent message writes to handle retries and avoid duplicates
  • Client-side buffering and reordering based on sequence numbers
  • Handling of read receipts and delivery status without breaking ordering

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

Q4

How would you design real-time message delivery to online users across millions of concurrent connections?

System DesignTechnical Trade-offs
Author's notes

WebSockets were obvious but the routing part tripped me up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, message types, delivery guarantees) and then propose a high-level architecture using a pub/sub backbone with persistent connections (e.g., WebSockets) and a distributed connection layer. Dive into trade-offs around state management, fan-out, and reliability, and discuss how to handle failures and scale horizontally.

Pro tip: Emphasize the importance of connection state and backpressure; showing awareness of these operational realities distinguishes senior engineers. Also, relate your design to Airbnb's use cases (e.g., chat, notifications) to demonstrate product empathy.

1. Clarify Requirements

Ask about scale (millions of connections), latency targets, message types (1:1, group, broadcast), delivery guarantees (at-least-once, exactly-once), and client types (mobile, web).

2. High-Level Architecture

Propose a layered design: connection gateways (WebSocket servers) for persistent connections, a pub/sub system (e.g., Kafka, Redis Pub/Sub) for message routing, and a service layer for business logic.

3. Deep Dive into Components

Detail how connection gateways maintain state, how messages are routed to the right gateway (e.g., via consistent hashing or a registry), and how to handle fan-out for group messages.

4. Address Trade-offs and Challenges

Discuss trade-offs: push vs. pull, stateful vs. stateless gateways, message ordering, delivery guarantees, and handling reconnections and missed messages.

5. Scaling and Reliability

Explain horizontal scaling of gateways, load balancing, failure recovery (e.g., reconnect with exponential backoff), and monitoring (e.g., connection counts, latency).

Key Points to Mention

  • WebSocket or long polling for persistent connections, with trade-offs (overhead, compatibility).
  • Pub/sub systems (Kafka, Redis) for decoupling and scaling message delivery.
  • Connection registry to map user IDs to gateway instances (e.g., using Redis or a distributed cache).
  • Message delivery guarantees: at-least-once vs. exactly-once, and idempotency.
  • Handling reconnections and missed messages: message queues per user, offline storage, and sync on reconnect.
  • Backpressure and flow control to prevent overload during spikes.

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

Q5

How do you track unread message counts per user per conversation efficiently, and how do you keep them accurate as messages are read?

System DesignData Modeling
Author's notes

Storing a last-read sequence number per user per conversation is elegant and I actually got this one right without much prompting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale (messages per second, users, conversations), read latency, and accuracy needs. Then propose a data model that stores unread counts per user per conversation, updated atomically on message send and read events, and discuss trade-offs between push (increment/decrement) and pull (compute on read) approaches. Finally, address consistency, idempotency, and scalability concerns.

Pro tip: Mention that you would use a per-user counter with atomic increments/decrements and a last-read timestamp to handle out-of-order events, and consider a fallback to recompute from the message store if counters drift.

1. Clarify Requirements and Scale

Ask about expected read/write throughput, number of participants per conversation, and whether eventual consistency is acceptable. This determines whether a simple counter or a more complex distributed solution is needed.

2. Design the Data Model

Propose a table or key-value store mapping (user_id, conversation_id) to an unread_count and last_read_message_id/timestamp. Consider using a wide-column store like Cassandra or a relational DB with proper indexing.

3. Handle Message Send and Read Events

On new message, atomically increment unread_count for all participants except sender. On read, atomically decrement or reset the count based on the read position, using idempotent operations to avoid double-counting.

4. Ensure Accuracy and Consistency

Use transactions or atomic operations (e.g., Redis INCR/DECR, DynamoDB atomic counters) to prevent race conditions. Implement idempotency keys for read receipts and handle out-of-order events with versioning or timestamps.

5. Address Scalability and Trade-offs

Discuss sharding by user_id or conversation_id, caching hot counters, and fallback mechanisms to recompute counts from the message store if drift occurs. Compare push vs. pull models and their impact on latency and cost.

Key Points to Mention

  • Atomic increment/decrement operations to avoid race conditions
  • Idempotency of read receipts to handle duplicate events
  • Use of last-read timestamp or message ID to compute unread count
  • Sharding and caching strategies for scalability
  • Trade-offs between push (maintain counter) and pull (compute on read) approaches
  • Fallback reconciliation to recompute counts from source of truth

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

Q6

How do you handle message history pagination efficiently as the conversation grows?

System DesignAlgorithms & Data Structures
Author's notes

Pretty straightforward once you've committed to partitioning by conversation ID.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as message volume, read/write patterns, and latency expectations. Then propose a cursor-based pagination scheme with a stable sort key (e.g., timestamp + message ID) and discuss storage/indexing strategies to support efficient queries. Finally, address edge cases like new messages arriving during pagination and consistency guarantees.

Pro tip: Mention that you would avoid offset-based pagination because it leads to duplicates or missed messages when new messages arrive, and instead use a cursor that encodes the last seen message's sort key. Also, consider using a composite index on (conversation_id, created_at, message_id) to make queries efficient.

1. Clarify requirements and constraints

Ask about expected message volume per conversation, read/write ratio, latency requirements, and whether messages are immutable. This determines the appropriate pagination strategy and storage design.

2. Choose a pagination strategy

Propose cursor-based pagination using a stable sort key (e.g., timestamp + message ID) to avoid duplicates and missed messages. Explain why offset-based pagination is problematic for real-time conversations.

3. Design the data model and indexing

Describe how messages are stored (e.g., in a wide-column store like Cassandra or a relational DB) and the need for a composite index on (conversation_id, created_at, message_id) to support efficient range queries.

4. Handle edge cases and consistency

Discuss how to handle new messages arriving during pagination (e.g., using a snapshot or accepting eventual consistency), and how to ensure the cursor remains valid even if messages are deleted.

5. Optimize for performance and scalability

Mention caching strategies (e.g., caching recent messages), using a dedicated service for message history, and potentially sharding by conversation ID to distribute load.

Key Points to Mention

  • Cursor-based pagination with a composite key (timestamp + message ID) to ensure stable ordering and avoid duplicates.
  • Why offset-based pagination fails in real-time systems: new messages shift offsets, causing duplicates or missed messages.
  • Database indexing: composite index on (conversation_id, created_at, message_id) for efficient range queries.
  • Handling new messages during pagination: use a cursor that points to a specific message, and fetch older messages relative to that cursor.
  • Caching recent messages in memory (e.g., Redis) to reduce database load for frequently accessed conversations.
  • Sharding or partitioning by conversation ID to scale horizontally and isolate hot conversations.

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

Q7

How would you guarantee a message is never lost if the server crashes after acknowledging the sender but before fan-out completes?

System DesignTechnical Trade-offs
Author's notes

This one caught me mid-sentence.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a durable, transactional approach to message handling. Explain how to use a write-ahead log or persistent queue with atomic operations to ensure the message is safely stored before acknowledgment, and discuss how to handle fan-out asynchronously with idempotency and retries.

Pro tip: Emphasize that guaranteeing no message loss requires a trade-off between latency and durability; acknowledging after persistence adds latency but ensures reliability. Also, mention that idempotency is crucial to handle duplicate deliveries during retries.

1. Clarify requirements and constraints

Ask about the expected throughput, latency tolerance, and consistency requirements to tailor the solution appropriately.

2. Design durable message storage

Propose persisting the message to a write-ahead log or a replicated message queue before sending an acknowledgment to the sender.

3. Implement atomic acknowledgment

Ensure that the acknowledgment is sent only after the message is durably stored, using transactions or two-phase commit if necessary.

4. Handle fan-out asynchronously with reliability

Use a separate consumer process to read from the durable log and perform fan-out, with retries and dead-letter queues for failures.

5. Ensure idempotency and exactly-once semantics

Design the fan-out to be idempotent, using unique message IDs and deduplication to avoid duplicate processing.

Key Points to Mention

  • Write-ahead logging (WAL) or persistent message queue (e.g., Kafka) for durability
  • Acknowledgment after persistence, not before
  • Idempotent consumers and deduplication for exactly-once processing
  • Asynchronous fan-out with retries and dead-letter queues
  • Trade-offs between latency, throughput, and durability
  • Replication and fault tolerance to handle server crashes

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

Q8

How would your design change if group conversations could have 100,000+ members instead of a few hundred?

System DesignTechnical Trade-offs
Author's notes

Fan-out on write becomes completely infeasible at that scale, which I said immediately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that scaling from hundreds to 100,000+ members fundamentally changes the design constraints, shifting from a simple fan-out model to a highly partitioned, asynchronous system. Focus on the core challenges: message delivery at scale, storage, and real-time updates, and propose a sharded, event-driven architecture with trade-offs.

Pro tip: Emphasize the importance of defining clear SLAs for message delivery latency and consistency, as these will drive architectural decisions and prevent over-engineering. Also, mention the need for graceful degradation and backpressure to handle peak loads.

1. Clarify Requirements and Scale

Ask about expected read/write patterns, latency requirements, consistency needs, and whether all members need real-time updates. This sets the stage for design decisions.

2. Identify Bottlenecks in Current Design

Analyze how the existing design (for a few hundred members) would fail at 100k+, such as database write contention, fan-out on write, and memory limits.

3. Propose a Scalable Architecture

Outline a sharded, partitioned system with asynchronous message queues, a distributed cache, and possibly a pub/sub model to handle high fan-out.

4. Address Data Storage and Retrieval

Discuss storage strategies: time-series databases for messages, cold storage for older messages, and efficient indexing for quick retrieval.

5. Discuss Trade-offs and Failure Modes

Highlight trade-offs like consistency vs. availability, cost implications, and how to handle failures (e.g., message loss, delayed delivery).

Key Points to Mention

  • Sharding/partitioning of group data to distribute load across multiple servers
  • Asynchronous fan-out using message queues (e.g., Kafka) to decouple producers and consumers
  • Caching strategies (e.g., Redis) for recent messages and member lists to reduce database load
  • Trade-offs between consistency and latency (e.g., eventual consistency for message delivery)
  • Backpressure and rate limiting to prevent system overload
  • Monitoring and alerting for message delivery latency and system health

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

Q9

How would you implement message edit, delete, and recall while keeping every participant's view consistent?

System DesignAPI & Integrations
Author's notes

Short answer: soft deletes with a tombstone or an edit event appended to the log, then propagate via the same fan-out path.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what does 'consistent' mean (eventual vs. strong), and how do edit/delete/recall differ in semantics? Then propose a design that treats each message as an immutable event with a versioned state, using a central authority to order operations and a real-time sync mechanism to propagate updates. Finally, discuss trade-offs between consistency, latency, and complexity.

Pro tip: Emphasize that 'recall' is not just a delete—it's a state change that must be visible to all participants, and often has a time limit. Mention that you'd use a monotonic version number per message to handle out-of-order updates, which shows you understand distributed systems pitfalls.

1. Clarify requirements and semantics

Ask about consistency level (strong vs. eventual), who can edit/delete/recall, time limits, and whether history is preserved. Define what 'consistent view' means for all participants.

2. Design data model and API

Model messages as immutable events with a unique ID and version. Define APIs for edit, delete, and recall that create new events or update state, and specify how clients fetch the latest state.

3. Choose consistency and ordering mechanism

Use a central sequencer (e.g., per-conversation queue) to order operations, or a distributed consensus protocol if needed. Assign monotonic version numbers to each message to resolve conflicts and ensure all participants converge.

4. Propagate updates in real-time

Push updates via WebSocket or long-polling to all participants. Include the message ID, new version, and operation type so clients can apply changes idempotently and handle out-of-order delivery.

5. Handle edge cases and trade-offs

Address offline clients, network partitions, and late-joining participants. Discuss how to reconcile conflicting edits (e.g., last-write-wins vs. manual merge) and the cost of strong consistency.

Key Points to Mention

  • Message versioning and idempotent updates to handle out-of-order events
  • Centralized ordering service (e.g., per-conversation log) for strong consistency
  • Real-time sync via WebSockets with fallback to polling
  • Semantic differences: edit vs. delete vs. recall (soft delete vs. hard delete, time limits)
  • Client-side reconciliation and optimistic UI updates
  • Trade-offs between consistency, latency, and system complexity

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