InterviewStack.io LogoInterviewStack.io

Database Scalability and High Availability Questions

Architectural approaches and operational practices for scaling and maintaining database availability. Topics include vertical versus horizontal scaling trade offs; replication topologies, leader and follower roles, read replicas and replica lag; read write splitting and connection pooling; sharding and partitioning strategies including range based, hash based, and consistent hashing approaches; handling hot partitions and data skew; federation and multi database federation patterns; cache layers and cache invalidation; rebalancing and resharding strategies; distributed concurrency control and transactional guarantees across shards; multi region deployment strategies, cross region failover and disaster recovery; monitoring, capacity planning, automation for failover and backups, and cost optimization at scale. Candidates should be able to pick scaling approaches based on read and write patterns and explain operational complexity and trade offs introduced by distributed data.

HardTechnical
38 practiced
Coding (pseudo-code): Implement a consistent hashing ring that supports weighted nodes and virtual nodes. Provide functions add_node(node_id, weight), remove_node(node_id), and get_node(key). Explain how virtual nodes improve balance and show how you minimize key remapping on node changes.
HardSystem Design
41 practiced
Design a backup and restore strategy for a compliance-sensitive 30 TB database that must support frequent incremental backups, cryptographic integrity verification, point-in-time restore to any time within 30 days, and regular automated restore validation. Include backup encryption, key rotation, and retention policies.
MediumSystem Design
46 practiced
Design: You need a database deployment across 4 regions to provide low-latency reads for users in each region while writes are majority-local. Discuss active-passive vs active-active topologies, replication choices, conflict resolution, and how you would implement cross-region failover with minimal data loss.
HardTechnical
33 practiced
Scenario: A migration inadvertently caused write amplification and IOPS spikes, resulting in severe performance degradation. Describe how you would quickly diagnose the root cause, immediate mitigation steps to protect the primary database, and longer-term fixes to avoid recurrence.
MediumTechnical
44 practiced
Given the SQL query: SELECT user_id, COUNT(*) FROM events WHERE event_type = 'click' AND created_at > '2025-01-01' GROUP BY user_id ORDER BY COUNT DESC LIMIT 100, propose indexes, partitioning, and rewrite strategies to optimize this query on a table with billions of rows.

Unlock Full Question Bank

Get access to hundreds of Database Scalability and High Availability interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.