Skip to content
ADHDecode
  1. Home
  2. Articles
  3. Sharding

Sharding Articles

50 articles

Multi-Tenant Sharding: Isolate Customers Across Shards

Sharding your database by customer is the most direct way to achieve true tenant isolation, but it’s also the most complex.

3 min read

MySQL Sharding with Vitess: VSchema and VTGate

Vitess's VSchema is the secret sauce that lets MySQL sharding feel like a single database, and VTGate is the unglamorous workhorse that makes it all hap.

3 min read

Sharding vs Partitioning: Which Data Strategy to Use

Sharding and partitioning are both ways to break up large datasets, but they operate at different levels and solve distinct problems.

3 min read

Tune Sharding Performance: Reduce Inter-Shard Traffic

Sharding doesn't magically make data independent; it just moves the problem of finding data from a single giant table to a distributed system where find.

5 min read

PostgreSQL Sharding with Citus: Distribute Tables

Citus doesn't actually shard PostgreSQL tables; it distributes them by replicating shard metadata and then distributing the actual data across multiple .

2 min read

Sharding in Production: Deploy and Operate Safely

Sharding in production is less about distributing data and more about distributing risk. Let's say you've got a massive PostgreSQL database, and it's st.

3 min read

ProxySQL Sharding Routing: Rule-Based Query Distribution

ProxySQL doesn't just blindly forward queries; it's a smart traffic cop for your database, and rule-based sharding is how it decides which backend serve.

3 min read

Query Routing in Sharded Systems: Parse and Dispatch

Query Routing in Sharded Systems: Parse and Dispatch — practical guide covering sharding setup, configuration, and troubleshooting with real-world examp...

4 min read

Range-Based Sharding: Ordered Partition Design

Range-based sharding, when implemented with ordered partitions, is fundamentally a way to trade off read locality for write complexity.

3 min read

Reshard Without Downtime: Rebalancing Strategy Guide

Reshard Without Downtime: Rebalancing Strategy Guide — practical guide covering sharding setup, configuration, and troubleshooting with real-world examp...

2 min read

Redis Cluster Sharding: Hash Slots and Node Distribution

Redis Cluster Sharding: Hash Slots and Node Distribution — practical guide covering sharding setup, configuration, and troubleshooting with real-world e...

3 min read

Combine Sharding with Replication: HA at Scale

Sharding and replication are often discussed as separate strategies, but their true power is unlocked when they're combined to achieve both scalability .

3 min read

Online Resharding: Move Data with Zero Downtime

The most surprising truth about online resharding is that it doesn't actually move data in the way you're probably imagining.

3 min read

Schema Design for Sharding: Avoid Cross-Shard Joins

Choosing the right primary key is the single most important decision you'll make when designing a sharded database, and it's often the reason cross-shar.

4 min read

Shard Coordination: Metadata and Catalog Management

The most surprising thing about shard coordination is that it's not about coordinating shards at all, but rather about coordinating the metadata that de.

2 min read

Shard Key Selection: The Most Critical Sharding Decision

Choosing the right shard key is the single most impactful decision you'll make when sharding a database, often determining whether your sharded system s.

3 min read

Cloud Spanner Splits: Automatic Sharding Internals

Cloud Spanner splits, the automatic sharding mechanism, actually work by dynamically partitioning your data based on estimated row count and data distri.

2 min read

Test Sharded Applications: Data Distribution and Edge Cases

Sharding doesn't just split your data; it fundamentally changes how your application reasons about consistency and availability.

3 min read

TiDB Sharding Architecture: Regions and PD Scheduler

TiDB sharding is a complex beast, and understanding how it handles data distribution across nodes is key to performance.

3 min read

Two-Phase Commit in Sharded Systems: Costs and Alternatives

Two-phase commit 2PC is often treated as a universal solution for distributed transactions, but its inherent performance penalties make it a dangerous d.

3 min read

Virtual Nodes in Sharding: Flexible Rebalancing

Virtual nodes are the secret sauce that makes sharding flexible, allowing you to rebalance your data without disrupting live traffic.

3 min read

Zero-Downtime Shard Migration: Live Cutover Strategy

Migrating database shards without downtime is less about a magical trick and more about a carefully orchestrated, multi-stage dance where data is mirror.

3 min read

Sharding Aggregation Challenges: Cross-Shard GROUP BY

The most surprising thing about sharding aggregations is that the database often has to do more work to aggregate data across shards than it would if th.

3 min read

Sharding Antipatterns: Pitfalls That Kill Performance

Sharding often fails not because the sharding strategy is inherently bad, but because the application's access patterns are fundamentally at odds with t.

3 min read

Application-Level Sharding: Route at the App, Not the DB

Application-level sharding breaks the monolithic database by distributing data across multiple independent database instances, each holding a subset of .

3 min read

Sharding Backup Strategy: Back Up Sharded Databases

Sharding a database means splitting it into smaller, more manageable pieces called shards. This is usually done to improve performance and scalability

4 min read

Combine Sharding with Caching: Reduce Cross-Shard Reads

Sharding and caching are often treated as separate optimizations, but their true power emerges when they're combined to drastically reduce expensive cro.

3 min read

Cassandra Partitioning: Token Ring and Shard Design

Cassandra doesn't have partitions in the traditional sense of a relational database; instead, it uses token ranges on a ring to distribute data.

2 min read

CockroachDB Range Sharding: Automatic Distribution

CockroachDB Range Sharding: Automatic Distribution — practical guide covering sharding setup, configuration, and troubleshooting with real-world examples.

4 min read

Consistent Hashing for Sharding: Minimize Data Movement

Consistent hashing is a surprisingly effective way to distribute data across a cluster without needing to rebalance everything when nodes join or leave.

2 min read

Cross-Shard Queries: Scatter-Gather and Fan-Out Patterns

Cross-shard queries are a necessary evil when your data is distributed across multiple database shards, and you need to retrieve information that spans .

3 min read

Shard Data Migration: Move Data Without Downtime

Moving data between shards without taking your application offline feels like magic, but it's a core capability in many distributed databases.

2 min read

Directory-Based Sharding: Lookup Table for Shard Routing

Directory-Based Sharding: Lookup Table for Shard Routing — practical guide covering sharding setup, configuration, and troubleshooting with real-world e...

3 min read

Distributed Transactions Across Shards: 2PC and Sagas

Distributed transactions are a fundamental challenge when your data is spread across multiple independent services or databases shards.

4 min read

DynamoDB Partitions: Shard Key Design and Hot Partition Fix

DynamoDB partitions don't grow; you have to actively manage their size and distribution by carefully choosing your shard key.

5 min read

Elasticsearch Sharding: Primary, Replica, and Rebalancing

Elasticsearch shards are the fundamental building blocks of how your data is distributed and scaled across your cluster.

4 min read

Enterprise Sharding Strategy: Architect for Petabyte Scale

The most surprising thing about petabyte-scale sharding is that the biggest bottleneck isn't the database itself, but the network connecting your applic.

2 min read

Sharding Failure Scenarios: Partial Outage and Recovery

A shard failure in a distributed database doesn't just take down a piece of data; it can cascade and halt the entire application if not handled with ext.

4 min read

Database Sharding Fundamentals: Split Data Horizontally

Sharding your database isn't just about splitting data; it's about giving each shard its own independent destiny, allowing them to operate and scale as .

3 min read

Geographic Sharding: Route Data by Region

Geographic sharding is not about storing data closer to users to speed up reads; it's primarily about compliance and data sovereignty, with performance .

3 min read

Hash-Based Sharding: Even Distribution Across Nodes

Hash-based sharding, surprisingly, often doesn't achieve perfectly even distribution across nodes by default, and that's precisely where its power lies.

3 min read

Horizontal vs Vertical Sharding: Choose Your Strategy

Sharding isn't just about splitting data; it's about fundamentally changing how your database interacts with its workload.

3 min read

Avoid Sharding Hotspots: Balanced Shard Key Design

Avoid Sharding Hotspots: Balanced Shard Key Design — practical guide covering sharding setup, configuration, and troubleshooting with real-world examples.

3 min read

Sharding Index Strategy: Local and Global Indexes

Sharding an index strategy can feel like you're building a distributed database where every shard is its own world, but they all need to agree on how to.

3 min read

Joins Across Shards: Co-location and Denormalization

Joins across shards are often a performance bottleneck, but the real surprise is how frequently they're completely avoidable with a bit of upfront desig.

3 min read

Load Test Sharded Databases: Validate Distribution

Sharded databases don't just distribute your data; they distribute your problems, and load testing is how you find out where they're hiding.

5 min read

Sharding in Microservices: Data Ownership and Isolation

Sharding in Microservices: Data Ownership and Isolation — practical guide covering sharding setup, configuration, and troubleshooting with real-world ex...

3 min read

Sharding Middleware Proxy: Route Queries Transparently

The most surprising thing about sharding middleware is that it often hides the complexity of distributed data, making it harder to understand what's act.

3 min read

MongoDB Sharding: Config Servers, Routers, Shard Keys

The most surprising thing about MongoDB sharding is that it doesn't actually do the sharding itself; it just orchestrates it.

2 min read

Monitor Sharded Databases: Metrics and Alerting

Sharded databases are a beast, and monitoring them is like trying to keep an eye on a hundred tiny, interconnected machines simultaneously.

3 min read
ADHDecode

Complex topics, finally made simple

Courses

  • Networking
  • Databases
  • Linux
  • Distributed Systems
  • Containers & Kubernetes
  • System Design
  • All Courses →

Resources

  • Cheatsheets
  • Debugging
  • Articles
  • About
  • Privacy
  • Sitemap

Connect

  • Twitter (opens in new tab)
  • GitHub (opens in new tab)

Built for curious minds. Free forever.

© 2026 ADHDecode. All content is free.

  • Home
  • Learn
  • Courses
Esc
Start typing to search all courses...
See all results →
↑↓ navigate Enter open Esc close