← Airbnb Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Airbnb system design round, one big question on distributed key-value stores that basically ate the whole session. Dense topic and I felt like I was playing whack-a-mole with follow-ups the entire time.

Questions Asked (1)

Q1

Design a distributed key-value store that supports get, put, and delete on string keys with byte-string values, optional TTL, and optional compare-and-swap. It should scale horizontally to billions of keys, stay highly available, support configurable consistency, and keep p99 latency low.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with the API surface which felt safe, but then they pushed immediately into partitioning and I jumped to consistent hashing before fully thinking through the replication story.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, consistency, latency, availability) and then propose a sharded, replicated architecture using consistent hashing and a consensus protocol like Raft for strong consistency. Discuss trade-offs between consistency models (e.g., eventual vs. strong) and how to achieve low p99 latency through techniques like caching, batching, and efficient data structures.

Pro tip: Emphasize that TTL and compare-and-swap require careful handling in a distributed system—use logical clocks or versioning to avoid race conditions, and consider lazy expiration with background cleanup to keep latency low.

1. Clarify Requirements and Scope

Ask about expected read/write ratio, consistency requirements, latency targets, and data size to tailor the design. Confirm that TTL and CAS are optional and can be configured per key.

2. High-Level Architecture

Propose a sharded, replicated system using consistent hashing for partitioning and a replication factor for fault tolerance. Use a coordinator node or client-side routing to direct requests to the appropriate shard.

3. Data Model and Storage Engine

Design the storage layer: use LSM-trees (e.g., RocksDB) for high write throughput and efficient range scans. Store keys with metadata (version, TTL) and values as byte strings. Implement TTL via expiration timestamps and background compaction.

4. Consistency and Replication

Choose a consistency model: for strong consistency, use Raft or Paxos per shard; for eventual consistency, use gossip or anti-entropy. Implement CAS using version numbers or conditional writes with quorum reads/writes.

5. Performance and Availability Optimizations

Discuss techniques to achieve low p99 latency: caching hot keys, batching requests, asynchronous replication, and load balancing. Ensure high availability with automatic failover and multi-datacenter replication.

Key Points to Mention

  • Consistent hashing for partitioning and rebalancing
  • Replication strategies (leader-follower, multi-leader) and quorum-based consistency
  • TTL implementation: lazy expiration vs. active expiration, and impact on latency
  • Compare-and-swap using versioning or conditional writes with consensus
  • Trade-offs between consistency, availability, and latency (CAP theorem)
  • Monitoring and metrics for p99 latency, and techniques like request hedging

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