Databricks·Machine Learning Engineer·Onsite - System Design / Architecture
- Design an in-memory key-value store that also tracks query-per-second load over a 5-minute sliding window, with APIs for put, get, and get_qps.
- How would you optimize memory usage so you're not storing a record for every single operation?
- How would you extend the tracking window from 5 minutes to 24 hours without blowing up memory?
- If multiple operations share the exact same timestamp, how do you count them correctly and what are the concurrency implications?
- How would you support per-key QPS tracking and identify the top-K hottest keys over the sliding window?
“I started with a naive list of timestamped ops and immediately the interviewer asked what happens after a few hours of traffic.”