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.

HardTechnical
0 practiced
Propose an algorithm to split a hot partition's integer keyspace into multiple shards while minimizing total key movement across the cluster. Assume keys map to integer ranges and you can move contiguous ranges. Describe computational approach (greedy, dynamic programming, or clustering), complexity, and operational steps to execute such split online.
EasyTechnical
0 practiced
You operate a single large relational DB showing growth in CPU, IO, and connections. The product owner suggests sharding; the CEO prefers managed vertical scaling. Describe the decision criteria, the metrics you would collect to decide, and a high-level plan (including rollback) for moving to sharding if needed. Consider SLOs and cost in your response.
MediumSystem Design
0 practiced
Describe a zero-downtime resharding plan for splitting a busy shard into two shards. Cover steps for bulk copying, streaming deltas, write-routing during cutover, verification of completeness, and rollback strategies. Emphasize operational checks and SRE safety mechanisms.
EasyBehavioral
0 practiced
Tell me about a time you led a database-related incident (replication failure, data corruption, or major outage). Describe the incident, your immediate actions, how you communicated with stakeholders during the event, and what you changed afterward (postmortem, automation, tests). Focus on measurable outcomes and learnings.
HardSystem Design
0 practiced
A banking system requires strong consistency for inter-account transfers across shards at 50k TPS. Compare using 2PC with a distributed transaction coordinator versus sharding to co-locate related accounts (so most transfers are local). Discuss trade-offs in latency, throughput, complexity, availability, and operational burden, and recommend an approach that meets ACID and SLO constraints.

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.