InterviewStack.io LogoInterviewStack.io

Database Performance Tuning and Scaling Questions

System-level performance work beyond a single query: configuration and resource tuning, capacity planning, handling large data volumes, and scaling read and write throughput. Covers identifying bottlenecks, growth management, and the vertical-versus-horizontal scaling decision. Tests whether a candidate can keep a database healthy as load grows.

HardSystem Design
64 practiced

Describe a zero-downtime resharding process for a live key-value store with 100TB of data and strict RTO less than 2 minutes for critical shards. Detail client routing/versioning, background data copy, cutover steps, write handling during migration, validation checks, and rollback strategy. Provide an outline of operational steps and corner-case handling.

HardTechnical
73 practiced

Design a consensus-based leader election and failover mechanism for a primary-per-shard cluster deployed across three data centers. Describe how you'd use Raft or Paxos, how to configure quorums, how to avoid split-brain, steps to handle data center loss or network partition, and how leader leases and clock skew affect safety.

HardTechnical
71 practiced

In Python or Java (state your choice), implement a rebalancer function for a consistent-hashing ring with virtual nodes that, given the current ring and a target node list, computes which hash ranges should move to which nodes to minimize total key movement. Focus on computing the mapping changes (no data transfer), include comments, and make it unit-testable.

EasyTechnical
63 practiced

Describe common database backup types: full/snapshot backups, incremental backups, and WAL-based point-in-time recovery (PITR). For a backend service that requires a maximum 1 hour RPO and 15 minute RTO, recommend a backup and replication strategy and explain why.

MediumTechnical
59 practiced

You're building an order processing system where a single logical transaction may touch multiple shards (inventory, order, payment). Propose patterns to achieve atomic multi-shard behavior: compare two-phase commit, distributed locks, and saga-based workflows. For each, explain latency implications, complexity, failure modes, and when you'd pick one over the others.

Unlock Full Question Bank

Get access to all 33 Database Performance Tuning and Scaling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.