← Airbnb Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Airbnb system design round focused on building a query system for user search and order history with time-range and geo filters. Pretty meaty problem that touched on ingestion, storage tradeoffs, and caching all in one go.

Questions Asked (1)

Q1

Design a system that lets users query their own search and order history, with filtering by time range and geographic location, sorted by time.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one sprawled fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then outline a high-level architecture that separates write and read paths. Focus on data modeling for efficient time-range and geo-filtered queries, and discuss trade-offs between consistency, latency, and cost.

Pro tip: Emphasize that search and order histories have different access patterns and retention needs, so consider separate storage solutions (e.g., Elasticsearch for search, a relational or NoSQL store for orders) and a unified query layer. Also, mention the importance of user privacy and data isolation.

1. Clarify Requirements

Ask about scale (QPS, data volume), latency requirements, consistency needs, and whether history includes both search and order events. Confirm that users can only access their own data.

2. Design Data Model

Propose a schema that captures user ID, timestamp, location (lat/long or geohash), and event details. Consider denormalization for read efficiency and partitioning by user ID and time.

3. Choose Storage and Indexing

Select appropriate databases: e.g., Cassandra for orders (time-series, high write throughput) and Elasticsearch for search history (full-text and geo queries). Use composite indexes on (user_id, timestamp) and geospatial indexes.

4. Design Query API and Processing

Define an API endpoint that accepts time range, location filters, and pagination. Implement query routing to the appropriate store, and consider caching frequent queries.

5. Address Trade-offs and Scalability

Discuss trade-offs: consistency vs. latency, cost of geo-indexing, and data retention. Explain how to scale with sharding, replication, and possibly a unified query service.

Key Points to Mention

  • Partitioning and sharding strategies by user ID to ensure data isolation and scalability.
  • Use of geohashing or geospatial indexes (e.g., R-tree, GeoHash) for efficient location filtering.
  • Time-series data modeling with timestamp as a primary sort key and efficient range queries.
  • Trade-offs between SQL and NoSQL, and between real-time and batch processing.
  • Caching strategies (e.g., Redis) for frequently accessed recent history.
  • Privacy and security: ensuring users can only access their own data, and data encryption.

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