InterviewStack.io LogoInterviewStack.io

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, routing, and the operational cost of a partitioned topology. Key to designing databases that scale horizontally.

HardTechnical
70 practiced

Discuss partitioning best practices for time-series data (e.g., metrics, logs) at petabyte scale. Cover partition/granularity strategies, retention policies, compaction, indexing, and query patterns you would optimize for.

EasyTechnical
77 practiced

Compare hash-based, range-based, and directory-based sharding approaches. For each, list the typical use-cases, primary trade-offs, and one example of a workload where that approach would be a poor fit.

MediumTechnical
125 practiced

You're moving analytical workloads off a sharded OLTP cluster to a data warehouse. Outline an ETL strategy that minimizes impact on OLTP performance, supports consistent snapshots, and keeps the warehouse reasonably up-to-date for near-real-time analytics.

MediumTechnical
79 practiced

Write a test plan to validate an online resharding tool before it runs on production. Include unit, integration, chaos, and performance tests and describe what success criteria you would enforce for each test type.

HardTechnical
88 practiced

A shard is receiving a malicious large number of requests for a small set of keys (DDoS/hot keys). Propose detection logic, immediate mitigations, and long-term architectural changes to reduce vulnerability to such attacks, including rate-limiting and sharding tactics.

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.