SysPad › Lessons › database lessons › PlanetScale
How PlanetScale works
PlanetScale - managed MySQL on Vitess with horizontal sharding. A request-path OLTP database that scales to high throughput; priced per plan.
PlanetScale is MySQL with two superpowers from Vitess (the sharding system that scaled YouTube): it shards horizontally under one logical database, and it treats your schema like git, branch it, change it safely, and deploy migrations to production without locking tables. It tackles the two scariest parts of running MySQL at scale.
What you will learn
- What is Vitess, and how does it scale MySQL horizontally?
- Why are database "branches" a big deal for schema changes?
- How are migrations applied without downtime?
- When is PlanetScale a better fit than plain RDS MySQL?
MySQL that shards (Vitess)
PlanetScale runs MySQL on top of Vitess, which transparently shards data across many MySQL instances while your app still sees one logical database. It also adds built-in connection pooling and query routing, the hard parts of scaling MySQL, handled for you.
Database branching (like git)
The standout feature: branches. You branch your production database, make schema changes on the branch, and test them in isolation, exactly like a code branch. The production schema is untouched until you’re ready.
⚓ Teams that ship schema changes often and can’t risk breaking production with a bad migration.
Non-blocking schema changes
You merge a branch via a deploy request. PlanetScale applies the migration to production using an online, non-blocking process, no long table locks, no downtime, even on large tables, with the ability to revert.
PlanetScale vs RDS MySQL
Choose PlanetScale when you want effortless horizontal scale, safe git-like schema workflows, and serverless connection handling. Choose RDS MySQL when you want a standard, single-primary MySQL with full feature compatibility and tight AWS integration, and don’t need Vitess-style sharding.
Flashcards
- What does PlanetScale use to scale MySQL, and how?
- Vitess: it shards data across many MySQL instances under one logical database, with built-in pooling and routing.
- What is a PlanetScale database branch?
- A git-like copy of the schema you change and test in isolation, leaving production untouched until you deploy.
- How are migrations applied to production in PlanetScale?
- Via a deploy request, an online, non-blocking schema change with no table locks or downtime (and revertible).
- What classic MySQL pain does PlanetScale’s deploy solve?
- Big
ALTERstatements that lock tables for a long time; PlanetScale applies them online without locking. - PlanetScale vs RDS MySQL?
- PlanetScale: Vitess sharding + git-like safe schema workflow. RDS MySQL: standard single-primary MySQL, full feature parity, tight AWS integration.
Sources
- PlanetScale Docs, How PlanetScale works (Vitess)
- PlanetScale Docs, Branching
- PlanetScale Docs, Non-blocking schema changes / deploy requests
- Vitess Docs, Sharding
Open the SysPad canvas · Official PlanetScale documentation