Database Sharding
Everything on SkillVeris tagged Database Sharding — collected across the glossary, study notes, blog, and cheat sheets.
11 resources across 3 libraries
Study Notes(1)
Cheat Sheets(1)
Interview Questions(9)
What is Database Sharding?
Database sharding is a horizontal partitioning technique that splits a large dataset across multiple independent database servers (shards), where each shard ho…
How Do You Choose a Sharding Key?
A good sharding key is a column with high cardinality and an even, predictable value distribution that matches your query patterns, so writes and reads spread…
What is Range-Based Sharding?
Range-based sharding assigns rows to shards based on contiguous ranges of the shard key's value, so each shard owns a specific, ordered slice such as user IDs…
What is Hash-Based Sharding?
Hash-based sharding applies a hash function to the shard key and uses the result (typically modulo the shard count) to assign each row to a shard, which spread…
What is Consistent Hashing and Why Do Databases Use It?
Consistent hashing maps both shard keys and shard servers onto the same circular hash space, so each key is owned by the next server found clockwise on the rin…
What Challenges Arise When Resharding and Rebalancing a Database?
Resharding, moving data to a new number of shards or a better key layout, is challenging because it must move large volumes of live data without downtime, keep…
How to Design a URL Shortener?
A URL shortener maps a long URL to a short unique code by generating a base62 identifier (via a counter, hash, or random string), storing the mapping in a key-…
What are the Main Database Sharding Strategies?
The main sharding strategies are range-based (splitting data by contiguous key ranges), hash-based (splitting data by a hash of the key), and directory-based (…
How Do You Rebalance Shards Without Downtime?
Rebalancing shards without downtime means gradually migrating a subset of data to new or less-loaded shards while keeping both the old and new locations correc…