Split data across servers
Database Sharding splits your data across multiple databases—each "shard" holds a portion of your data. Users 1-1M on Shard 1, users 1M-2M on Shard 2, etc. Unlike replication (same data copied to many servers), sharding splits different data to different servers. Allows infinite scaling but adds complexity. Most startups never need sharding—vertical scaling and read replicas handle 99% of cases.
Only shard when you've maxed out vertical scaling (biggest database server available) and read replicas, when you have >10TB of data, or when single-database writes can't keep up. Most startups never reach this point. Before sharding: optimize queries, add indexes, use caching, scale vertically, add read replicas. Sharding is a last resort—it adds huge operational complexity.
System Design Patterns