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.

MediumTechnical
73 practiced

You operate a service with a primary DB and read replicas. One replica reports replication-lag histogram: 90th percentile lag = 2s, 99th percentile = 12s, max = 90s. What conclusions can you draw about staleness risk for user reads, and what immediate SRE actions or alerts would you configure to prevent user-visible anomalies?

HardSystem Design
94 practiced

Design a replication strategy for a write-heavy service serving 500k writes/second in a single region with strong consistency required for most operations. Explain whether you would use synchronous replication, leader sharding, partitioning, or a leaderless design; describe trade-offs for latency, availability, hardware costs, and operational complexity.

MediumTechnical
87 practiced

What is consistent hashing and how does it reduce data movement when the number of shards changes? Explain the role of virtual nodes and how they improve load distribution on the hash ring.

HardTechnical
92 practiced

Tail latency spikes increased after increasing shard count. Outline how you would diagnose root causes (network issues, coordination overhead, compaction/GC, metadata lookups), which tools and traces you'd use, and what optimizations you would try to reduce tail latency in a sharded datastore.

MediumTechnical
77 practiced

Clarify the difference between logical partitions and physical partitions. As a Solutions Architect, when would you recommend exposing logical partitions in the application versus enforcing physical shard boundaries in the database layer?

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.