PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Databricks

Design a durable key-value store

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design and storage engineering skills, focusing on durability, crash recovery, on-disk layout, concurrency control, and performance trade-offs for an embeddable key–value store, and is classified in the System Design domain.

  • hard
  • Databricks
  • System Design
  • Software Engineer

Design a durable key-value store

Company: Databricks

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a durable key-value store that supports put(key, value), get(key), and delete(key). Specify how you will achieve durability with a write-ahead log (WAL), lay out on-disk data structures, and perform crash recovery. Describe compaction/garbage collection, fsync/batching strategy, and handling of torn writes. Explain your concurrency model: single-writer/multi-reader vs. multi-writer, lock-based vs. optimistic/lock-free approaches, and how you ensure correctness under concurrent access. Analyze consistency guarantees (e.g., read-after-write), latency/throughput trade-offs, and back-of-the-envelope resource estimates. Provide a minimal testing plan covering failure injection and recovery.

Quick Answer: This question evaluates system design and storage engineering skills, focusing on durability, crash recovery, on-disk layout, concurrency control, and performance trade-offs for an embeddable key–value store, and is classified in the System Design domain.

Related Interview Questions

  • Design a Book Price Aggregator - Databricks (medium)
  • Design a stock order manager - Databricks (medium)
  • Design an Online Bookstore - Databricks (hard)
  • Design a Hierarchical File System - Databricks (hard)
  • Design a Visa-like payment processing system - Databricks (hard)
Databricks logo
Databricks
Aug 11, 2025, 12:00 AM
Software Engineer
Onsite
System Design
86
0

System Design: Durable Key–Value Store

Context

Design a single-node, embeddable key–value store library with a simple API that must remain correct and durable across process crashes and power failures. Assume a POSIX-like filesystem on SSD/NVMe with 4 KiB sectors.

API

  • put(key, value)
  • get(key)
  • delete(key)

Keys/values are byte arrays; no secondary indexes or transactions beyond single-key operations.

Requirements

  1. Durability via a write-ahead log (WAL): format, rotation, and fsync policy.
  2. On-disk data structures and layout: how data files and metadata are organized.
  3. Crash recovery: how to detect and recover from incomplete operations.
  4. Compaction/garbage collection: reclaiming stale versions and tombstones.
  5. fsync and batching strategy: throughput/latency trade-offs.
  6. Handling torn writes and partial files.
  7. Concurrency model: single-writer/multi-reader vs. multi-writer; lock-based vs. optimistic/lock-free; ensuring correctness.
  8. Consistency guarantees: e.g., read-after-write, linearizability options.
  9. Performance analysis: latency/throughput trade-offs and back-of-the-envelope resource estimates.
  10. Minimal testing plan including failure injection and recovery validation.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Databricks•More Software Engineer•Databricks Software Engineer•Databricks System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.