Update Strategy
TurboCI uses a cluster-based update strategy for zero-downtime deployments with built-in safety.
How It Works
TurboCI updates clusters one at a time, ensuring high availability throughout the deployment process:
1. Cluster-Based Updates
Services are divided into clusters. Each cluster contains multiple instances that deploy simultaneously, but clusters update one at a time.
2. Load Balancer Updates
After each cluster is updated, any assigned load balancer is also updated. This ensures traffic is always routed to healthy servers.
3. Zero Downtime
Because clusters update sequentially, you always have running instances serving traffic. Even during vertical scaling, there's zero downtime.
Example Configuration
Configure clusters and instances for your deployment strategy:
services:
web:
instances: 3 # 3 servers per cluster
clusters: 2 # 2 clusters = 6 total servers
server_type: cpx21
# ... other config
Total servers = instances × clusters. In this example: 3 × 2 = 6 servers total.
Update Process
Example: 6 servers (2 clusters × 3 instances)
Cluster 1 (Servers 1-3)
All 3 servers updated → Load balancer updated → Continue
Cluster 2 (Servers 4-6)
All 3 servers updated → Load balancer updated → Complete
While Cluster 1 updates, Cluster 2 continues serving traffic. While Cluster 2 updates, Cluster 1 (now updated) serves traffic.
Health Checks
Configure health checks to verify services are working correctly after deployment:
services:
web:
instances: 3
clusters: 2
healthcheck:
cmd: curl http://localhost:3000/api/healthcheck
test: Server Running
The cmd
runs on each server, and the test
string must be found in the output for the healthcheck to pass.
Next Steps
Learn how to deploy the same application across multiple cloud providers.
Continue to Multi-Cloud Setup →