Overview
Migrating services without downtime is critical for production workloads. This guide covers proven strategies for moving applications between Breezes while keeping your services available throughout the process.
Strategy 1: DNS-Based Failover
Run the application on both old and new servers simultaneously, then switch DNS:
- Set up the new Breeze as an exact replica
- Lower DNS TTL to 60 seconds at least 24 hours before migration
- Sync data one final time, then update DNS to point to the new server
- Keep the old server running until all DNS caches expire
Strategy 2: Load Balancer Cutover
Place both servers behind a load balancer and drain traffic gradually:
# Example Nginx upstream config
upstream myapp {
server old-breeze-ip:80 weight=5;
server new-breeze-ip:80 weight=5;
}
# Gradually shift traffic
upstream myapp {
server old-breeze-ip:80 weight=1;
server new-breeze-ip:80 weight=9;
}
# Final cutover
upstream myapp {
server new-breeze-ip:80;
}Strategy 3: Database Replication
Set up MySQL replication to keep databases in sync during migration:
# On new server (replica)
CHANGE REPLICATION SOURCE TO
SOURCE_HOST='old-breeze-ip',
SOURCE_USER='repl_user',
SOURCE_PASSWORD='repl_password',
SOURCE_LOG_FILE='mysql-bin.000001',
SOURCE_LOG_POS=154;
START REPLICA;Once the replica is caught up, promote it to primary.
Strategy 4: Blue-Green Deployment
- Build the complete environment on the new Breeze (blue)
- Run full test suites against the blue environment
- Switch the router or load balancer to blue
- Keep green (old) ready for instant rollback
Key Principles
- Always have a rollback plan
- Test the new environment thoroughly before switching
- Monitor error rates closely during and after cutover
- Communicate maintenance windows even for zero-downtime migrations