HTAP Summit 2024 session replays are now live!Access Session Replays
TiDB Serverless vs PlanetScale

Today, it’s normal for apps to be available at any time of day, no matter where you are in the world. But to meet that expectation, you need to make sure your infrastructure can scale to match demand, work around failure, and maintain consistent performance.

The good news is that several database platforms promise to do just that. But it can be hard to choose between competing offerings.

In this comparison, we’re going to make the choice easier by looking at two MySQL compatible distributed database platforms. Namely, TiDB Serverless and PlanetScale.

Quick Summary: TiDB Serverless vs. PlanetScale

Let’s jump straight to the important part of the comparison. Which one is best for you?

Mostly, it comes down to what you prioritize:

  • Scalability: TiDB Serverless scales automatically with demand, while PlanetScale’s automatic scaling is limited to enterprise plans.
  • Reliability: TiDB Serverless offers multi-region support by default, while PlanetScale reserves this feature for enterprise customers.
  • Additional Features: TiDB Serverless comes with AI-powered tools like vector search and query optimization. PlanetScale focuses on core MySQL functionality but lacks AI-driven enhancements.
  • Cost: TiDB Serverless operates on a pay-as-you-go model, making it more cost-effective for variable workloads. PlanetScale requires reserving resources upfront, especially for non-enterprise plans.

If you’re looking for flexibility, effortless scaling, and advanced features, TiDB Serverless may be the better option. Read on for a detailed breakdown of how they compare.

TiDB Serverless Overview

TiDB Serverless is a MySQL-compatible serverless database system that makes it supremely easy to set up and manage the database infrastructure that you need to develop always-on applications. Built on top of the open source TiDB, TiDB Serverless aims to shield you as the developer from having to think about details like sharding and replication.

Instead, TiDB Serverless makes sure that the resources your application needs are available on-demand. It can do this thanks to a truly cloud-native architecture, built from the ground up to make the most efficient possible use of underlying cloud resources. It can do this because its architecture is made up of many different microservices, each taking care of a specialized job. For example, memory bound workloads are deployed on instances with plenty of RAM, while compute intensive microservices get more compute power.

Why do you need to consider this as a developer who is looking for a database platform? TiDB Serverless’s architecture allows it to allocate resources much more efficiently than if every server were exactly the same. The benefit to you comes in two forms: lower pricing and greater scalability.

Beyond its architecture, TiDB Serverless builds on top of MySQL compatibility to also give you:

  • Vector search for building graph-based RAG, enabling AI applications.
  • AI-assisted SQL query editing.
  • Database branching so you can quickly make copies of your database during development.
  • REST API access to your database.
  • A suite of observability tools to help identify slow queries, resource bottlenecks, and potential issues.

PlanetScale Overview

PlanetScale is a managed MySQL-compatible Database-as-a-Service (DBaaS) designed to overcome the scalability and availability limitations of traditional MySQL databases. This functionality is powered by Vitess, an open-source project that transforms MySQL into a scalable, cloud-native database. PlanetScale is often featured with:

  • Shared nothing architecture
  • Connection pooling and edge infrastructure
  • Non-blocking schema changes and schema roll-backs without data loss
  • Database branching to enable easy development against your real data.

Probably the most impactful of these is shared nothing architecture, with which PlnetScale manages scaling and high availability. It isn’t unusual in systems like NoSQL databases or Apache Kafka but it’s a big change from traditional MySQL’s tightly coupled architecture. Shared nothing means that every node is equal. There are no separate routing, query, or storage nodes, so that even if one node experiences issues, the overall system can continue to operate smoothly without significant disruption to service.

But your experience will depend on whether you pay for a regular or an enterprise plan. For regular plans, you’re limited to a single cloud region. Only enterprise plans start from $3000/mo get to take advantage of automatic horizontal scaling and multi-region distribution of data.

Managed vs Serverless

The architectural differences between TiDB Serverless and PlanetScale also influence how each is operated. We’ve already used the terms “managed database” and “serverless” and we should note that they’re not interchangeable.

Let’s look at what difference that makes to how you think about and then operate a database.

Managed databases: A managed service saves you from having to think about many of the day-to-day DevOps tasks associated with running a database. The idea is that you can put those resources to building and maintaining your application, instead.

In practice, though, you still need to make decisions about the infrastructure, such as choosing the right specifications for RAM, CPU, and storage based on your needs. In the case of PlanetScale’s Pro Scaler plans that means you need to specify the RAM and CPU you think you’ll need for your database. And then you pay for those resources, whether you use them or not. If you take an enterprise plan then PlanetScale will scale automatically.

Serverless databases: Serverless databases take a different approach. They save you from having to think about the underlying infrastructure at all. Instead, they automatically allocate RAM and CPU according to what your application needs from one moment to the next.

So rather than paying to reserve resources, you pay for what you use even if that doubles from one minute to the next. As a developer, you get to focus entirely on your application knowing that you can treat your database as an always available utility.

A Head-to-Head Comparison

We’ve seen how TiDB Serverless and PlanetScale differ architecturally. But how do they perform as databases?

To answer that question, we’re going to compare them using these categories:

  • Core database functionality: Beyond MySQL compatibility, how do TiDB Serverless and PlanetScale perform when it comes to the fundamentals? For example, in terms of query, ACID compliance, indexing, and so on.
  • Additional functionality: What else do they offer? For example, do they enable AI applications through vector search?
  • Performance and scalability: When demand changes, how do they respond? Can they operate well under load? Do they scale back down when things get quieter?
  • Resilience and reliability: What happens when something goes wrong? Can they work around failure and ensure your application gets consistently high uptimes?
  • Developer experience and usability: What are they like to develop with? Do they offer SDKs? Is the documentation good? What about community and support options?
  • Pricing and cost-effectiveness: How does the pricing model affect what you’ll pay?

1. Core Database Functionality

As MySQL-compatible systems, both PlanetScale and TiDB Serverless give you the fundamentals that you’d expect from a modern relational database.

PlanetScaleTiDB Serverless
MySQL compatibilityRuns on MySQL 8 with the Vitess clustering service. Offers good compatibility but with limitations.Excellent compatibility with MySQL 5.7, with improvements where MySQL falls behind
ACID transactionsYesYes
IndexingPrimary key
Unique
Full text
B+ trees
Spatial
Descending
And other MySQL index types
Primary key
Unique
Secondary
Composite
Invisible
Data typesAll MySQL data typesAll MySQL data types other than spatial

2. AI-readiness and Features Designed for Efficiency

Beyond standard relational database functionality, what do PlanetScale and TiDB Serverless offer to help build innovative applications?

PlanetScaleTiDB Serverless
Vector search for AI applicationsNoYes
Database branchingYesYes
REST APIsYes, for general database managementYes, providing access to your data
AI assisted SQL query editorNoYes

3. Scalability

How your database scales can mean the difference between easily handling spikes in demand versus facing significant disruptions that could leave you embarrassed and scrambling to restore services during crucial times.

When it comes to how PlanetScale and TiDB Serverless handle scaling, we need to consider whether horizontal scaling is available to you.

With PlanetScale, it all comes down to which plan you choose. Regular plans in the Pro Scaler range require that you plan for how much initial capacity you need for your database in order to meet demand. This means you might need to reserve capacity even if you don’t need it all of the time. That’s because PlanetScale doesn’t offer automatic vertical scaling and horizontal scaling is available only on enterprise plans, starting at $3,000 a month.

TiDB Serverless takes a different approach by scaling seamlessly to match your application’s workload demands. That way, you don’t need to worry about whether you have enough capacity and you pay only for what you use.

PlanetScale(non-enterprise plans)TiDB Serverless
Automatic scalingOnly for storageYes, seamlessly and on demand
Vertical scalingOnly if you manually adjust your plan
Horizontal scalingOnly for enterprise plans
Scale to zeroNoYes
Distributed transactionsYesYes

4. Reliability and Resilience

Understanding the availability characteristics of your database is crucial for keeping your application online. How does the database handle failures? Is it possible to modify the database schema without downtime? Do you need to take the database offline to make an upgrade?

In some respects, reliability is the other side of the coin from scalability. The architectural choices that enable scaling also enable reliability. By reserving horizontal scaling only for enterprise customers, PlanetScale’s Pro Scaler plan is by definition less reliable than it could be.

PlanetScaleTiDB Serverless
Multi-regionOnly for enterprise customersYes, with TiDB Cloud
Automatic failoverYes, limited to two replicas for Pro Scaler customersYes, with TiDB Cloud
Automatic, non-blocking schema changesYesYes
Zero downtime upgradesUpgrades between major versions appears to require some downtimeYes

5. Usability and Developer Experience

How quickly you can get functionality into the hands of your users is a major factor in whether one database or another is the right choice for you.

Both PlanetScale and TiDB Serverless offer strong MySQL compatibility, meaning that you have access to a wide range of tooling, learning materials, and expertise. But what does either service offer on top of that?

PlanetScaleTiDB Serverless
Free tierNoYes, with 25 GiB free storage.
Open sourceBased on open source MySQL and VitessBased on open source TiDB
Drivers and ORMsSupports MySQL drivers and ORMs. Also offers a serverless JavaScript driver specifically for PlanetScale.Drivers for all major languages. Supports ORMs including Hibernate, Spring Data, jOOQ, and JDBC
CLIYesYes

Spin up a Serverless database with 25GiB free resources.

Sign Up for Free

6. Pricing: Start from $39/mo vs. Start FREE

The difference between managed and serverless pricing can have a significant impact on your overall database costs. Let’s look at how they differ:

  • PlanetScale: With the Pro Scaler plan starts at $39/mo, you choose the RAM and CPU you think your database will need and then pay for the storage you use. Enterprise pricing starts at $3000/mo, which makes less sense for most developers.
  • TiDB Serverless: Instead of estimating the memory and processing power needed upfront, TiDB Serverless adopts a pay-as-you-go model. You are only charged based on actual usage, such as the amount of writes, reads, and CPU time spent on SQL query processing. There is no baseline instance price, meaning you pay only for what you use. Read more about how we built efficiency into TiDB Serverless.

👉 Download a detailed comparison.

Making Decisions: Choosing the Most Suitable One

Your database is, arguably, the single most important component of your application architecture. Individual microservices might come and the same is true of external tooling. But your database is a long-term choice whose performance characteristics, developer experience, and pricing will determine how well you can serve your end users.

So, how do you make a choice between two different database offerings? The answer depends on what you value the most. Let’s recap TiDB Serverless vs. PlanetScale:

  • Managed vs serverless: If you want to focus on your application, rather than planning and managing database capacity, then TiDB Serverless is likely to be the better option for you. PlanetScale’s enterprise plan features automatic scaling but you’ll need to be ready to make a serious investment if you want to take advantage of it.
  • MySQL compatibility: If you need 100% compatibility with MySQL, then neither PlanetScale nor TiDB Serverless can help. Both cover the vast majority of the functionality you’ll need but they make minor compromises in order to enable functionality such as replication, scaling, and branching.
  • Core functionality: Both PlanetScale and TiDB Serverless check all the boxes you need when it comes to fundamental relational database functionality. However, only TiDB Serverless offers an AI assistant to improve your queries and vector search.
  • Scaling and reliability: If you’re willing to pay for it, PlanetScale’s enterprise plan can help you meet spikes in demand and serve a global audience. But if you only need the Pro Scaler plans then there’s really no comparison between PlanetScale and TiDB Serverless. PlanetScale’s Pro Scaler plans are something of a misnomer because they don’t scale, unless you do it manually. And by being limited to a single cloud region with no option for horizontal scaling, they’re lacking when it comes to resilience. TiDB Serverless is architected from the ground up as a distributed, transactional database that will stay online even if individual nodes experience outages. And you never have to think about scaling TiDB Serverless because it automatically matches your application’s level of demand, even if that scales down to zero.
  • Developer experience: Both databases offer a good developer experience, with access to familiar tooling complemented by features like database branching and zero downtime schema upgrades. However, only TiDB Serverless offers an AI assistant to optimize your SQL queries.
  • Cost effectiveness: By charging you for capacity rather than usage, PlanetScale makes you pay for what you might use whereas TiDB Serverless charges you for what you do use. That’s an important distinction, especially if you have spiky loads.

If you want reliability, scalability, and a NoOps experience then TiDB Serverless could be the right database for you. You can get started with our free tier.

Sign Up for Free

Spin up a Serverless database with 25GiB free resources.

Start Right Away

Have questions? Let us know how we can help.

Contact Us

TiDB Cloud Dedicated

A fully-managed cloud DBaaS for predictable workloads

TiDB Cloud Serverless

A fully-managed cloud DBaaS for auto-scaling workloads