PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Databricks

Design KV store with sliding-window QPS metrics

Last updated: Mar 29, 2026

Quick Overview

This question evaluates designing an in-memory key–value store with sliding-window throughput metrics, testing competencies in data structures, concurrency, time-series aggregation, and real-time performance measurement.

  • medium
  • Databricks
  • System Design
  • Software Engineer

Design KV store with sliding-window QPS metrics

Company: Databricks

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

## Problem Design an **in-memory key–value store** that supports basic operations and can report the **average operation load** over a recent time window. ### Functional requirements 1. **KV operations** - `PUT(key, value)` stores/overwrites a value. - `GET(key)` retrieves the value (or `null`/not found). 2. **Load/throughput metric query** - Provide a function that can answer, for a given time window (e.g., the **last 10 minutes**): - **Average GETs per second** during that window - **Average PUTs per second** during that window - Example query: “In the past 10 minutes, what is the average GET QPS and PUT QPS?” ### Clarifications to resolve with the interviewer (state assumptions if not provided) - Is the window always “last X” (sliding window) vs. “between start/end timestamps”? Assume **sliding window: last X**. - Maximum window size / retention (e.g., up to 1 year). Assume queries can be up to **1 year**. - Exactness vs approximation. Assume **exact counts** are preferred if feasible. - Concurrency expectations. Assume **multi-threaded** callers. ### Non-functional goals - KV operations should be low latency. - Metric queries should be efficient for common windows (minutes/hours) and not require scanning raw logs. - Memory usage should be bounded given a maximum retention.

Quick Answer: This question evaluates designing an in-memory key–value store with sliding-window throughput metrics, testing competencies in data structures, concurrency, time-series aggregation, and real-time performance measurement.

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
Nov 8, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
9
0
Loading...

Problem

Design an in-memory key–value store that supports basic operations and can report the average operation load over a recent time window.

Functional requirements

  1. KV operations
    • PUT(key, value) stores/overwrites a value.
    • GET(key) retrieves the value (or null /not found).
  2. Load/throughput metric query
    • Provide a function that can answer, for a given time window (e.g., the last 10 minutes ):
      • Average GETs per second during that window
      • Average PUTs per second during that window
    • Example query: “In the past 10 minutes, what is the average GET QPS and PUT QPS?”

Clarifications to resolve with the interviewer (state assumptions if not provided)

  • Is the window always “last X” (sliding window) vs. “between start/end timestamps”? Assume sliding window: last X .
  • Maximum window size / retention (e.g., up to 1 year). Assume queries can be up to 1 year .
  • Exactness vs approximation. Assume exact counts are preferred if feasible.
  • Concurrency expectations. Assume multi-threaded callers.

Non-functional goals

  • KV operations should be low latency.
  • Metric queries should be efficient for common windows (minutes/hours) and not require scanning raw logs.
  • Memory usage should be bounded given a maximum retention.

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.