Zero-Downtime SQL Database Schema Evolution for Continuous Deployment

More Info
expand_more

Abstract

When a web service or application evolves, its database schema --- tables, constraints, and indices --- often need to evolve along with it. Depending on the database, some of these changes require a full table lock, preventing the service from accessing the tables under change. To deal with this, web services are typically taken offline momentarily to modify the database schema. However with the introduction of concepts like Continuous Deployment, web services are deployed into their production environments every time the source code is modified. Having to take the service offline --- potentially several times a day --- to perform schema changes is undesirable. In this paper we introduce QuantumDB --- a middleware solution that abstracts this evolution process away from the web service without locking tables. This allows us to redeploy a web service without needing to take it offline even when a database schema change is necessary. In addition QuantumDB puts no restrictions on the method of deployment, supports schema changes to multiple tables using changesets, and does not subvert foreign key constraints during the evolution process. We evaluate QuantumDB by applying 19 synthetic and 81 industrial evolution scenarios to our open source implementation of QuantumDB. These experiments demonstrate that QuantumDB realizes zero-downtime schema evolution at the cost of acceptable overhead, and is applicable in industrial Continuous Deployment contexts.

Files