The Zero Downtime Deployment

Smaine Milianni
6 min readDec 18, 2022

(La version Fr est diponisble ici)

Zero Downtime Deployment known by its acronym ZDD is the act of deploying a new version of your application code without maintenance or deterioration of service, most of the time when we talk about ZDD we focus on the switchover of a version N to a version N+1 without interruption of service via different strategies:

This article is focus on the ZDD from the application code side, if as a developer we do not necessarily have control over the deployment scripts and the chosen strategy, we must still ensure that our application is 100% functional and that even if the deployment fails or takes a lot of time, I will take 3 classic cases:

I was saying that the ZDD is the fact of deploying without maintenance,

YES, no more releases in production at dawn 🐓 or dusk 🌃.

We deploy at any time 😍.

⚡️ Releases must be transparent for end users and to achieve this, it is necessary to ensure that the modifications made are compatible with the current version.

💡 When you’re doing ZDD the easiest way is to modify your database before your application code.

If you look closely at the diagram, you can see that there is a period of time when the code in production (version N) lives with the database (version N+1).

This time can be fast if you have few migrations but it can also be long if you add an index on a large table… Worse, this time can be indefinite if a migration fails or if your deployment script crashes…

In reality, you have no guarantee to deliver in a few seconds and this risk alone is enough to make your migrations “ZDD compliant”.



Smaine Milianni

Fullstack Developer- certified Symfony 4,5 and certified AWS Solution Architect - Freelancer - Remote Worker