Adding zero-downtime migrations strategy in SaaS project - Iga Karbowiak

Опубликовано: 17 Март 2026
на канале: Python Italia
62
2

Adding zero-downtime migrations strategy in SaaS project - Iga Karbowiak - PyCon Italia 2024

Elevator Pitch:
When operating a web-based SaaS application, it is important to provide software updates without any downtime In this talk, I will demonstrate how to accomplish this by introducing a zero-downtime migration strategy 🐍

Description:
When running a web-based SaaS application, it is important to provide software updates without causing downtime for users. However, these updates often require changing the database schema with migrations. In this talk, we will discuss a solution that allows the software to remain life and able to handle incoming traffic while performing migrations.

To ensure zero downtime during this process, the old code must be compatible with the new database schema. Although this may seem easy, it often isn't. In this talk, we will cover problematic operations such as:

renaming tables or columns,
deleting tables or columns,
adding new columns,
updating all records in a table with a large amount of data.

We will discuss potential problems that may arise due to certain changes and provide corresponding solutions. Additionally, I will describe the challenges we encountered when introducing this approach to Saleor, an open-source e-commerce platform powered by Django.

While the topic and examples are from the Django project, the issue is general and can be faced by any database-related project.

The structure of the talk:

1. Background of the problem
2. Examples of operations causing the downtime
3. Introducing the zero-downtime strategy
1. Writing migrations that follow a zero downtime approach
2. Proceeding the software update without any downtime

Learn more: https://2024.pycon.it/event/adding-ze...

#Django #PostgreSQL #OpenSource #Databases #DeploymentContinuousIntegration