AI SummaryUse this skill when: Patterns for horizontally scaling multi-tenant databases through sharding. Sharding distributes tenant data across multiple database instances to achieve horizontal scale. This skill covers shard key selection, routing strategies, and operational considerations for sharded multi
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "sharding-strategies" skill in my project. Please run this command in my terminal: # Install skill into your project (2 files) mkdir -p .claude/skills/sharding-strategies && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/sharding-strategies/SKILL.md "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/sharding-strategies/SKILL.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/sharding-strategies/metadata.json "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/sharding-strategies/metadata.json" Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.
Description
Horizontal scaling patterns for multi-tenant databases. Covers shard key selection, consistent hashing, and shard management.
Overview
Patterns for horizontally scaling multi-tenant databases through sharding. Sharding distributes tenant data across multiple database instances to achieve horizontal scale. This skill covers shard key selection, routing strategies, and operational considerations for sharded multi-tenant systems.
When to Use This Skill
Use this skill when: • Sharding Strategies tasks - Working on horizontal scaling patterns for multi-tenant databases. covers shard key selection, consistent hashing, and shard management • Planning or design - Need guidance on Sharding Strategies approaches • Best practices - Want to follow established patterns and standards
Sharding Architectures
`text +------------------------------------------------------------------+ | Sharding Approaches | +------------------------------------------------------------------+ | | | Tenant-per-Shard Tenant-per-Database Hash-Based | | +--------+ +--------+ +----------+ | | |Shard 1 | | DB 1 | | Shard 1 | | | |T1,T2,T3| | Tenant | | Hash 0-25| | | +--------+ +--------+ +----------+ | | |Shard 2 | | DB 2 | | Shard 2 | | | |T4,T5,T6| | Tenant | | Hash 26-50| | | +--------+ +--------+ +----------+ | | | | Good for pooled Good for silo Good for even | | tenants tenants distribution | +------------------------------------------------------------------+ `
Key Selection Criteria
`text Shard Key Considerations: +------------------------------------------------------------------+ | Criterion | Good Key | Bad Key | +--------------------+-------------------------+-------------------+ | Cardinality | TenantId (many values) | Status (few vals) | | Distribution | UUID (even) | Created date (hot)| | Query patterns | Always in WHERE | Optional filter | | Stability | Immutable | Can change | | Cross-shard joins | Rarely needed | Frequently needed | +--------------------+-------------------------+-------------------+ `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster