db-sharding-partitioning
Installation
SKILL.md
Database Sharding & Partitioning
This skill focuses on 'Horizontal Scaling' of the data layer, handling datasets too large for a single machine.
Instructions
- Select a 'Shard Key' that ensures even data distribution.
- Implement 'Directory-based' or 'Range-based' sharding logic.
- Design a 'Query Router' to direct requests to the correct shard.
- Implement 'Table Partitioning' (by Date, ID) within individual shards.
- Manage cross-shard queries and data re-balancing over time.
Examples
- "Design a sharding strategy for a chat app with 100 million users."
- "Partition a PostgreSQL 'logs' table by month for faster archiving."