Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Sharding Strategies in 2026: Range, Hash, Geo, Directory — Which Wins When

DEV Community·Gabriel Anhaia·about 1 month ago
#rhnJjf7u
Reading 0:00
15s threshold

Book: System Design Pocket Guide: Fundamentals Also by me: Database Playbook My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You picked range sharding by created_at because the data was time-series. Imagine it's six months in. The bulk of writes are landing on one shard while the rest of the cluster idles. Your on-call is a multi-hour rebalance script holding SHARE UPDATE EXCLUSIVE on every write. Or you picked hash sharding for even spread. Two quarters later, the analytics team wants "all orders from last Tuesday." The planner fans out across every shard, holds partial results on the coordinator, and times out half the dashboards. Sharding is one of the few choices that can break a system after launch. Most teams know the four options exist. Fewer are honest about what each one costs when the data goes lopsided. Here is the tradeoff matrix, with copy-able Postgres examples for each.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More