Blue-Green and Canary Deployments
Zero-downtime deployment strategies for Ever Gauzy.
Blue-Green Deployment
Process
- Blue is the current production (v1.0)
- Green is deployed with new version (v1.1)
- Run smoke tests against Green
- Switch load balancer to Green
- Blue becomes standby for rollback
Kubernetes Implementation
# service.yaml
apiVersion: v1
kind: Service
metadata:
name: gauzy-api
spec:
selector:
app: gauzy-api
version: green # Switch between blue/green
ports:
- port: 3000
Rollback
Simply switch the service selector back to version: blue.
Canary Deployment
Process
- Deploy canary (v1.1) alongside stable (v1.0)
- Route 10% of traffic to canary
- Monitor error rates and latency
- Gradually increase canary traffic
- Full rollout or rollback
Nginx Canary
upstream gauzy {
server api-v1:3000 weight=9;
server api-v2:3000 weight=1;
}
Related Pages
- Production Deployment — deployment guide
- CI/CD Pipeline — CI/CD
- Health Checks — health monitoring