Home / Companies / PlanetScale / Blog / Post Details
Content Deep Dive

How does database sharding work?

Blog post from PlanetScale

Post Details
Company
Date Published
Author
Justin Gage
Word Count
2,004
Company Posts That Month
11
Language
English
Hacker News Points
343
Post removed?
No
Summary

Sharding is a technique used to scale out relational databases by storing partitions of data across multiple servers instead of putting everything on a single server. This allows for more efficient use of resources and improved scalability. Sharding can be done at different levels, such as row-level (horizontal) or schema-level (vertical), and involves deciding how to split up data into shards based on the business model and query load. The process of sharding includes planning and executing a migration, building a routing layer to direct queries to the correct databases, and managing hotspots where servers become overloaded with data. While some teams build their own sharding solutions from scratch, there are also tools and frameworks available, such as Vitess for MySQL and Citus for Postgres, that can simplify the process. The trend of using "serverless" databases, which automatically handle sharding and scaling, is gaining traction, offering an alternative to traditional sharding approaches.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Serverless 2 518 98 52 -42%
Developer Experience 1 176 95 50 -26%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.