9 Zero Downtime Deployments
Zero Downtime Deployments
This chapter covers:
- Customizing resource lifecycles with the create_before_destroy flag
- Performing Blue/Green deployments with Terraform
- Refactoring a flat module workspace into a nested module hierarchy
- Modifying state with terraform state and terraform import CLI commands
Traditionally, there has been a window of time during software deployments when servers are incapable of serving production traffic. This window is typically scheduled for early morning off-hours to minimize impact, but it’s still downtime from the customer’s perspective. Zero Downtime Deployment (ZDD) describes the practice of keeping services always running and available to customers during software deployments.
ZDD enables developers to deliver software updates and patches to customers without interrupting the user experience. If done well, users may not even be aware that a software update is taking place. Zero downtime deployment means high software availability, and availability is considered the most important criteria for the success of any software. Many customers have come to expect services to be always on an available when they need it. After all, when was the last time you heard of Google or Amazon being down for scheduled maintenance?