InterviewStack.io LogoInterviewStack.io

Database Architecture and Partitioning Questions

Design database architecture and partitioning strategies appropriate to workload and access patterns. Evaluate database types including relational and various NoSQL models, schema design and indexing strategies, and when to use a monolithic database versus sharding. Cover sharding approaches such as range based, hash based, consistent hashing, and directory based sharding, as well as replica topologies, read replicas, replication lag, and handling cross shard queries. Address operational concerns at scale: resharding, mitigating hot partitions, balancing data distribution, transactional and consistency guarantees, and the trade offs between availability, consistency, and partition tolerance. Include monitoring, migration strategies, and impact on application logic and joins.

MediumSystem Design
59 practiced
Design a partitioning scheme for an IoT telemetry table that receives writes from 10 million devices, each sending data every minute. Requirements: support time-range queries per device for the last 90 days, high write throughput, and efficient daily batch aggregation for model training. Provide schema, partitioning key choices, and rationale.
HardTechnical
57 practiced
Create a monitoring plan with specific metrics, SLOs, and dashboard panels to ensure an online feature store meets a p95 read latency SLA of 30ms. Include how to differentiate between database, network, and application causes when p95 is breached and what automated mitigations you would apply.
EasyTechnical
60 practiced
You're evaluating whether to keep a monolithic database or move to sharding for the company's training dataset used by ML models. The dataset is 5 TB and grows 50% annually; queries are mix of batch training and interactive feature exploration. As a data scientist, list the decision criteria and recommend which approach to take, explaining trade-offs for model development and serving.
EasyTechnical
51 practiced
Explain the CAP theorem and discuss its practical implications for designing a distributed storage used for both training data and online serving of predictions. Provide one concrete example where you would prioritize availability over consistency and one where the reverse is true.
MediumTechnical
50 practiced
A table experiences hot partitions because recent timestamps concentrate writes into the newest partition, causing write throughput failure. Propose three strategies (at storage and application level) to alleviate hot partitions for write-heavy time-series data and discuss their impact on read queries used for model features.

Unlock Full Question Bank

Get access to hundreds of Database Architecture and Partitioning interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.