Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Database Sharding Topology Planner

    1

    Design horizontal sharding architectures, partition keys, and query routing layers for high-scale databases.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Database Sharding Topology Planner

    Database Sharding Topology Planner

    Example session with this skill installed

    I need a sharding plan for a global e-commerce platform using PostgreSQL. We have 50TB of order data and frequent 'hot spots' on flash sale days. Help me pick a key and routing strategy.

    • Read your context and instructions
    • Compiled the database sharding topology

    I have analyzed your workload requirements for the global e-commerce platform. Given the flash sale volatility and 50TB volume, a hash-based sharding strategy is recommended to distribute write pressure uniformly. ## Horizontal Sharding Topology Plan: E-commerce Orders | Component | Specification | | :--- | :--- | | **Shard Key** | `hash(user_id)` | | **Partition Strategy** | Consistent Hashing (to minimize remapping during shard additions) | | **Co-location Logic** | Co-locate `order_items` and `shipping_details` with `orders` via `user_id` | | **Routing Layer** | Sidecar-based Query Coordinator (e.g., Vitess-style VTGate or custom proxy) | | **Hot Spot Mitigation** | Virtual nodes mapping to physical shards to balance high-traffic users | ### Routing Algorithm Logic ```sql -- Logical routing flow for the Query Coordinator -- 1. Extract user_id from query predicate -- 2. Calculate hash: target_shard = md5(user_id) % total_virtual_nodes -- 3. Map virtual node to physical IP via internal lookup table -- 4. Forward query to specific shard; return result to application ``` ### Shard Splitting & Rebalancing Strategy 1. **Threshold Monitoring**: Trigger split when a physical shard reaches 80% of 2TB capacity. 2. **Logical Grouping**: Use 1024 virtual buckets mapped to 16 initial physical shards. 3. **Live Migration**: Copy data to new shard in background, tail the WAL for delta sync, and flip the routing table pointer during a low-traffic window. **Next steps** - Review the `user_id` distribution in your current dataset to ensure high entropy. - Select a routing proxy (e.g., Vitess for MySQL or Citus for Postgres) to implement the coordinator layer. - Define the `virtual_node` mapping table in your configuration management system.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Scaling a database beyond a single node introduces immediate complexity in data distribution and query routing. This skill provides a structured framework for designing horizontal sharding architectures that maintain performance while eliminating cross-shard bottlenecks. ## What it does - **Shard Key Selection** identifies the optimal hash, range, or directory-based partitioning strategy for your specific data access patterns. - **Data Co-location** designs schemas that group related entities on the same physical nodes to prevent expensive cross-shard joins. - **Routing Layer Architecture** defines the query coordinator logic to ensure requests hit the correct shard with minimal latency. - **Migration Planning** formulates shard splitting procedures and live data migration paths that avoid system downtime. ## How it works 1. **Analyze workload** to determine if hash-based, range-based, or directory-based sharding is appropriate for your traffic. 2. **Define entity relationships** to map how related records should be co-located to maintain relational integrity without distributed transactions. 3. **Map the routing logic** by designing the coordinator layer that handles shard discovery and query distribution. 4. **Draft the rebalancing strategy** for future growth, outlining how shards will split and migrate as data volume increases. ## Frameworks & tools This skill is platform-agnostic and applies to high-scale RDBMS like PostgreSQL and MySQL, as well as NoSQL systems. It focuses on the architectural logic required for distributed environments. ## Why this beats prompting it yourself Manual prompts often result in generic advice that ignores the critical "hot spot" problem or cross-shard join overhead. This skill uses a deterministic workflow to ensure the routing layer and shard key selection are mathematically and logically sound for petabyte-scale growth. ## Use cases - Designing a sharding strategy for a multi-tenant SaaS with uneven data growth. - Migrating a monolithic PostgreSQL instance to a horizontally scaled cluster. - Implementing a custom shard routing layer for a high-throughput microservice. - Planning a non-disruptive shard split for a rapidly expanding time-series database. ## Known limitations This skill focuses on architectural design and topology planning rather than providing automated scripts for physical infrastructure provisioning or cloud-specific managed service configurations.

    Focuses on architectural blueprints and routing logic. Does not provide infrastructure-as-code scripts or automated database migration execution tools.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Requires

    File System Read/Write (strictly scoped to current project workspace `./`).
    Zero global installation or elevated privileges required.

    Permissions

    Read Files

    Target Use Cases: - Design a horizontal sharding architecture for PostgreSQL. - Select shard key for multi-tenant database scaling. - Plan zero-downtime shard rebalancing and routing strategy.

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a comprehensive architectural blueprint, including optimized shard key selection, data co-location strategies, and a detailed query routing logic map designed to prevent cross-shard bottlenecks.

    Yes, while it excels at high-scale RDBMS like PostgreSQL and MySQL, the architectural logic is platform-agnostic and applies to NoSQL systems where partitioning and data locality are critical.

    This skill is designed for use with advanced LLMs (like GPT-4 or Claude 3.5) and is compatible with any AI agent platform that supports structured architectural design workflows.

    The planner specifically identifies access patterns that cause 'hot spots' and designs shard keys that distribute traffic evenly, ensuring one shard doesn't become a performance bottleneck.

    No, this skill focuses on the logical and structural design phase; it provides the 'how-to' and the map, but it does not generate cloud-specific infrastructure-as-code (IaC) or automated migration scripts.

    New in Data & Databases