pathdoc - stock.adobe.com

PlanetScale eases serverless database schema migration

The database-as-a-service platform vendor looks to make it easier for developers to build data-driven applications and revert schema changes when needed.

Serverless database platform vendor PlanetScale today unveiled a preview of a new schema migration capability that aims to make it easier for DevOps professionals to used databases.

The vendor, based in Mountain View, Calif., has built out a serverless database platform in a database-as-a-service model. At the foundation of PlanetScale is the open source Vitess project, which is run by the Cloud Native Computing Foundation and builds a distributed deployment of the MySQL database in the cloud.

With its new update, the serverless database vendor is introducing a feature it calls PlanetScale Rewind that enables database administrators and DevOps professionals to "rewind" or undo bad schema migrations.

PlanetScale has targeted its database platform particularly at DevOps professionals because they routinely and rapidly iterate applications that could require schema changes.

"PlanetScale is known for positioning its database for developers, and the new rewind capability is just another arrow that the company is adding to the developer's quiver," said James Curtis, an analyst at S&P Global. "There's a lot of hard-lifting tech that goes into implementing rolling back changes should updates not go as planned, so I would imagine there's a cadre of developers that are embracing this for potentially smoother DevOps."

A lot of focus in recent years has been on improving the application development experience, but databases have largely lagged behind. Rewind is a good example of trying to make developers' and other practitioners' lives better.
Stephen O'GradyAnalyst, RedMonk

RedMonk analyst Stephen O'Grady said he also sees the usefulness of PlanetScale's new feature for developers because the capability is aimed at improving the experience of using and working with databases.

"A lot of focus in recent years has been on improving the application development experience, but databases have largely lagged behind," O'Grady said. "Rewind is a good example of trying to make developers' and other practitioners' lives better."

Easy schema migration to serverless database platform

A schema defines the organizational structure of data in a database deployment, and changing it for an in-production database can be a risky proposition.

Nicholas Van Wiggeren, VP of engineering at PlanetScale, said his team has built out capabilities that enable database administrators to easily migrate to a new schema. If the schema migration doesn't work as planned, the database can be rolled back with PlanetScale Rewind to the previous schema, without losing any data.

The ability to restore from a point-in-time snapshot is a common feature in database platforms. But Van Wiggeren said PlanetScale Rewind is not a simple snapshot restore capability.

"Other databases, of course, have the ability to restore, but that's not what we're doing," he said. "What we're actually doing is we're able to materialize the database before and after the schema migration."

Screenshot of PlanetScale Rewind
The PlanetScale Rewind feature enables users to revert schema migration changes for a running database without losing any data.

So if a schema migration occurs and the database administrator realizes that the application isn't working properly, Van Wiggeren said that a single button click with PlanetScale Rewind will revert the database to what it looked like before the migration.

Any data written while the new schema was in place is not lost. And rewinding to the previous schema doesn't involve any changes to running applications, as all the changes occur inside of PlanetScale.

How PlanetScale Rewind works to support the serverless database

The ability to easily migrate schemas uses underlying capabilities of the open source Vitess technology, a project created at YouTube in 2010 to handle large-scale data deployments.

Van Wiggeren noted that Vitess is designed for distributed deployments. Therefore, if a database is deployed in multiple regions, the PlanetScale Rewind feature will work across all the regions to roll back a schema migration.

"Behind the scenes, Vitess is able to calculate what the new schema looks like and what the old schema looked like, and figures out how to materialize the data for both so we can swap back and forth," Van Wiggeren said.

Dig Deeper on Database management