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
91 practiced

Explain quorum-based consistency with the R + W > N rule. Give an example configuration (N, R, W), show how read and write quorum choices affect failure tolerance and stale reads, and discuss observable behavior during partial failures like a node crash or network partition.

EasyTechnical
136 practiced

List and explain four properties that make a good shard key. For each property, give a brief example (user_id, timestamp, region, email hash, etc.) and explain why it helps avoid hotspots or cross-shard queries.

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.

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?

MediumTechnical
72 practiced

You receive reports of stale reads for a small percentage of users. Outline a step-by-step troubleshooting plan to identify root cause: what logs, traces, metrics, and checks would you run; how to reproduce; and how to validate whether the issue stems from replication lag, caching, DNS, or client behavior.

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.