Intermediate
System Design
Q70 / 100
What is the difference between "horizontal sharding by range" and "sharding by hash"?
Correct! Well done.
Incorrect.
The correct answer is A) Range sharding assigns contiguous ranges of a key to each shard (good for range queries but risks uneven load); hash sharding distributes keys more evenly via a hash function but makes range queries harder
A
Correct Answer
Range sharding assigns contiguous ranges of a key to each shard (good for range queries but risks uneven load); hash sharding distributes keys more evenly via a hash function but makes range queries harder
Explanation
Range-based sharding preserves ordering and supports efficient range scans but can cause "hot spots" if data isn't evenly distributed; hash-based sharding distributes load more evenly but scatters related/ordered data across shards.
Progress
70/100