Range sharding assigns key ranges to shards. Enables efficient range queries but risks hotspots. HBase, BigTable, DynamoDB Global Tables use it.
The mechanic
Metadata service tracks which shard owns which key range. Query looks up shard, routes.
The mechanic
Metadata service tracks which shard owns which key range. Query looks up shard, routes.
Range queries win
Scanning A-M = hit shards 1+2, sequential reads. Hash sharding requires touching every shard.
Hotspot risk
Recent timestamps → all traffic on newest shard. Auto-incrementing IDs → same problem. Bucket by hash prefix if needed.
Rebalancing
Split hot shard into two. Move half its range to new shard. Neighboring shards unaffected. Much better than hash sharding.
When to use
Time-series (partition by day). Geographic (partition by region). Any query pattern that benefits from ordered scans.