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
0 practiced
You need to guarantee serializable transactions across two shards without a central coordinator that becomes a bottleneck. Propose a lock-free or low-coordination protocol that provides strong consistency, explain how it handles conflicts and network partitions, and state its limitations.
MediumTechnical
0 practiced
You're asked to recommend a database architecture for a SaaS tenant-based application with 10k tenants of varying sizes. Compare three multi-tenancy models: shared-schema, partially-sharded (tenant groups), and fully-isolated DB per tenant. Discuss scaling, cost, operational complexity, and security for each, and recommend when each model is appropriate.
MediumTechnical
0 practiced
A query shows frequent full table scans on a sharded table. Explain a systematic approach to diagnose the cause (query plan, schema, index usage, shard routing) and propose corrective actions prioritized by expected impact and risk.
EasyTechnical
0 practiced
Explain, in the context of OLTP and OLAP workloads, the trade-offs between vertical scaling (scaling up) and horizontal scaling (scaling out) for a relational database. Include operational, cost, latency, and consistency considerations and give two example scenarios where you would choose each approach.
MediumTechnical
0 practiced
Design a sharding key selection process for a user activity table containing: user_id, activity_time, activity_type, and payload. The workload has 90% reads (user profile + recent activity) and 10% writes. Describe candidate shard keys, evaluation criteria, and choice with justification.

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.