data-partitioning
Design partitioning and sharding strategies for data at scale. Use when single database hits throughput or storage limits.
от sethdford★ 51 звезда на GitHub
Установить data-partitioning в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Data Partitioning
Design partitioning strategies (sharding, bucketing) to distribute data across multiple databases or nodes, enabling horizontal scaling.
Context
You are designing data partitioning for large-scale systems. The user faces single database bottlenecks (throughput or storage). Read their data volume, access patterns, and consistency requirements.
Domain Context
Based on designing data-intensive applications and partition strategies from Dynamo/Cassandra:
- Range Partitioning: Partition by key range (UserID 1-1000 on DB1, 1001-2000 on DB2). Simple but uneven load.
- Hash Partitioning: Partition by hash(key). Even distribution, but range queries require scatter-gather.
- Directory-Based: Maintain mapping of key → partition. Flexible, adds lookup cost.
- Rebalancing: When adding nodes, some partitions migrate. Strategy affects availability.
- Hot Partitions: Some keys receive disproportionate traffic. Mitigate by splitting hot partition or using caching.
Instructions
Choose Partition Key: What key distributes evenly? UserID is obvious for user-centric apps. For IoT, might be (SensorType, RegionID). Avoid keys that hotspot (Country or Status).
Select Partitioning Scheme:
- Range: If range queries common (time-series data). Risk: uneven distribution.
- Hash: If uniform access. Range queries require scatter-gather.
- Directory: If rebalancing needed frequently. Cost: lookup on every request.
Plan Rebalancing: How do you add capacity? Manual assignment or automatic? How long to rebalance? Require zero-downtime.
Handle Hot Partitions: If UserID=1 gets 1000x traffic, split further (UserID=1-A, UserID=1-B). Or use cache in front.
Define Consistency Model: Within partition, can be strongly consistent. Across partitions, typically eventual consistency. Define what queries require multi-partition reads.
Anti-Patterns
- Partition Key Too Fine-Grained: Each request hits different partition. Result: no cache hits, high latency. Guard: Partition key should group frequently-accessed data.
- Uneven Partition Distribution: One partition holds 90% of data. Result: that node becomes bottleneck. Guard: Measure partition size distribution; rebalance if skew > 2x.
- Cross-Partition Transactions: Rely on distributed transactions for consistency. Result: complex, slow, failure-prone. Guard: Keep transactions within single partition; accept eventual consistency across partitions.
- No Plan for Rebalancing: Cannot add capacity without downtime. Guard: Design rebalancing strategy before going to production.
Further Reading
- Designing Data-Intensive Applications by Martin Kleppmann — comprehensive partitioning strategies
- Cassandra: The Definitive Guide — practical partitioning in distributed systems
- Google Spanner — consistency and partitioning at scale
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл data-partitioning?
Design partitioning and sharding strategies for data at scale. Use when single database hits throughput or storage limits.
Как установить скилл data-partitioning?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-partitioning запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…