Blue-Green Deployment
Maintain two identical environments: Blue (current live) and Green (new version). Switch traffic after Green passes testing.
upstream app {
server 127.0.0.1:8080; # blue (active)
# server 127.0.0.1:8081; # green (uncomment to switch)
}
💡 Blue-green enables instant rollback: just switch Nginx back to blue with one command.