Core Flow AI builds AI-powered entertainment apps. This involves everything from the web app to the infrastructure and all the AI models. We are responsible for a top 50 gen AI consumer app with over 500k users a day. We have scaled incredibly fast, resulting in over 10 million users in less than 1 year.

We've handled this growth with a team of less than 10 people. A critical part of our success relies on having a database that can handle 10x-ing every few months while minimizing developer overhead.

Pain points with Supabase

We, as many startups, started our project on Supabase. Supabase was incredibly easy to get started with and really helped us bootstrap our first few months. However, we quickly started running into database problems. Occasionally, we'd find a bad query resulted in the entire database locking up, or deleting users becoming next to impossible as we had amassed 100M profiles in the table.

Most of these issues were self-inflicted (aka writing bad queries). Supabase didn’t provide much in terms of query-level observability to help us identify and improve these poorly written queries, and since we were growing so fast, we didn't have time to debug with a fine tooth comb. Instead, we  had to vertically scale our database and add read replicas to temporarily delay the problem.

Eventually, we hit a point where we were on the largest self-serve sized database, hitting multiple outages a month with little visibility into what was going wrong. Supabase's team was incredibly responsive, but without seeing our code, there was little they could do to help.

They did offer to spin up a larger size, but it would take weeks for them to provision it. Unfortunately, we didn’t have weeks to spare.

Why PlanetScale

Around the same time, we saw that PlanetScale released Metal for Postgres. The benchmarks were incredible. They also had much larger self-serve instances than Supabase, so we thought we'd get a lot more runway by simply moving to them and leveraging more vertical scaling.

Although we moved purely for the sake of vertical scaling and performance, we were incredibly impressed by functionality PlanetScale had, such as Insights, high availability with read replica failover, and hands-on support from Sam (PlanetScale CEO) himself.

Before we get into what the migration looked like, the result of moving to PlanetScale ended up being:

Our 1 week migration to PlanetScale

Day 1

As a startup, we move fast. I gave myself ~1 week to move our production workloads live to PlanetScale. The great news is the PlanetScale team moves just as quickly. Before I knew it, a Slack channel was set up with Sam and the rest of the team sharing guides and quickly upgrading my account.

We use a few extensions such as pgvector, and before even considering moving, we needed to make sure it was supported in PlanetScale. Gomez from the Engineering team was quick to answer all of my questions. He helped us with the initial migration setup, and before we knew it, we had a sync up and running, replicating our Supabase data into PlanetScale.

Day 2