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

Explain how database-level replication lag can affect read-after-write consistency in systems using read replicas. As a data engineer, describe patterns to ensure users see their own recent writes (for example, sticky sessions, session routing, read-your-writes guarantees) and trade-offs involved.

MediumTechnical
79 practiced

Explain how read-your-writes consistency and monotonic reads matter for user-facing ML features. Propose implementation options to provide these guarantees in a distributed replication topology and discuss performance implications.

MediumTechnical
70 practiced

Develop a cost model to compare two choices for scaling a sharded datastore: adding more smaller instances versus upgrading to fewer larger instances. Include hardware, licensing, operational overhead, failover impact, and migration complexity in your model and describe how you'd apply it to a decision.

HardTechnical
77 practiced

A client uses a directory-based sharding mapping stored in a small database. The mapping occasionally becomes inconsistent due to partial updates. Design an audit and corrective workflow to detect stale or incorrect directory entries and correct routing without downtime, including tools and verification steps.

MediumSystem Design
90 practiced

Design a resharding testing framework and CI/CD pipeline that validates correctness, performance, and rollback for different workloads. Include workload generators (including skew/hot keys), chaos tests (node failures, network partitions), canary rollout steps, automated verification (row-level checksums, aggregated metrics), and integration with deployment pipelines.

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.