Sharding Strategy Guide
Design effective database sharding strategies for horizontal scaling with proper shard key selection and query routing.
Usage
Describe your data model and scaling requirements, and this skill will help you design a sharding strategy.
Examples
- "Choose a shard key for a multi-tenant SaaS application"
- "Design a sharding strategy for a high-write event logging system"
- "Plan a migration from a single database to a sharded architecture"
Guidelines
- Choose shard keys that distribute data evenly and align with query patterns
- Minimize cross-shard queries by co-locating related data
- Plan for resharding before you need it
- Keep a global lookup table for shard routing
- Consider the operational complexity before choosing to shard