Replication, Partitioning, and Sharding Questions

Scaling and distributing data across nodes: primary-replica and multi-primary replication, read-replica scaling, horizontal partitioning, and sharding strategies with their key-selection and rebalancing challenges. Covers replication lag, failover and split-brain handling, cross-shard operations such as joins, distributed transactions, and global secondary indexes, and the operational cost of a partitioned topology. Key to designing databases that scale horizontally.

HardTechnical
101 practiced

Write an operational playbook for recovering from a single-shard failure that causes read/write errors for a subset of users. Include detection, immediate mitigation steps, data integrity checks, and post-recovery validation steps relevant to a sharded SQL database.

HardTechnical
73 practiced

Your sharded cluster experiences a network partition causing split-brain: some replicas accepted writes while others accepted conflicting writes. Explain a failure-handling strategy covering detection, automated reconciliation (if possible), conflict resolution policies (last-write-wins vs application-specific merge), and preventive controls (quorum enforcement, fencing tokens). Discuss trade-offs for each choice.

MediumTechnical
100 practiced

Describe table partitioning and when you would partition by date for a large events table. Explain partition pruning and how it affects performance for queries that target recent time ranges. Also list the operational considerations for adding and dropping partitions.

MediumTechnical
81 practiced

Explain database federation as an alternative to sharding: querying across multiple independently-owned databases without redistributing their data. Describe one scenario where federation is preferable to sharding, and one where federation introduces unacceptable complexity.

HardSystem Design
71 practiced

Explain how to obtain a consistent point-in-time snapshot across multiple shards for backup or analytics without stopping writes. Discuss algorithms such as distributed snapshot via global logical timestamps/epochs, MVCC-based snapshots, and coordinator-driven snapshot epochs; explain how to coordinate shards to produce a consistent view.

Unlock Full Question Bank

Get access to all Replication, Partitioning, and Sharding interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.