wheels deploy proxy
Configure and manage deployment proxy settings for routing traffic during deployments.
Synopsis
wheels deploy proxy <action> [options]
Description
The wheels deploy proxy
command manages proxy configurations for zero-downtime deployments, traffic routing, and load balancing during deployment operations. It handles blue-green deployments, canary releases, and traffic splitting strategies.
Actions
config
- View or update proxy configurationroute
- Manage traffic routing ruleshealth
- Check proxy and backend healthswitch
- Switch traffic between deploymentsrollback
- Revert proxy to previous configurationstatus
- Show current proxy status
Options
--environment, -e
- Target environment (default: production)--strategy
- Deployment strategy (blue-green, canary, rolling)--weight
- Traffic weight percentage for canary deployments--backend
- Backend server or service identifier--health-check
- Health check endpoint--timeout
- Proxy timeout in seconds--sticky-sessions
- Enable session affinity--ssl-redirect
- Force SSL redirect
Deployment Strategies
Blue-Green Deployment
# Configure blue-green proxy
wheels deploy proxy config --strategy blue-green
# Switch traffic to green
wheels deploy proxy switch --to green
# Rollback to blue if needed
wheels deploy proxy rollback
Canary Deployment
# Start canary with 10% traffic
wheels deploy proxy route --strategy canary --weight 10
# Increase to 50%
wheels deploy proxy route --weight 50
# Full deployment
wheels deploy proxy route --weight 100
Rolling Deployment
# Configure rolling updates
wheels deploy proxy config --strategy rolling --batch-size 25
Examples
Configure proxy settings
wheels deploy proxy config \
--health-check /health \
--timeout 30 \
--ssl-redirect
View proxy status
wheels deploy proxy status
Set up canary deployment
# Deploy new version to canary
wheels deploy proxy route \
--strategy canary \
--backend app-v2 \
--weight 5
# Monitor metrics...
# Gradually increase traffic
wheels deploy proxy route --weight 25
wheels deploy proxy route --weight 50
wheels deploy proxy route --weight 100
Health check configuration
wheels deploy proxy health \
--health-check /api/health \
--interval 10 \
--timeout 5 \
--retries 3
Traffic Routing Rules
Weight-based routing
# Split traffic 80/20
wheels deploy proxy route \
--backend app-v1 --weight 80 \
--backend app-v2 --weight 20
Header-based routing
# Route beta users to new version
wheels deploy proxy route \
--rule "header:X-Beta-User=true" \
--backend app-v2
Geographic routing
# Route by region
wheels deploy proxy route \
--rule "geo:region=us-west" \
--backend app-us-west
Proxy Configuration
Load balancing
# Configure load balancing algorithm
wheels deploy proxy config \
--load-balancer round-robin \
--health-check /health
Session affinity
# Enable sticky sessions
wheels deploy proxy config \
--sticky-sessions \
--session-cookie "app_session"
SSL/TLS settings
# Configure SSL
wheels deploy proxy config \
--ssl-redirect \
--ssl-protocols "TLSv1.2,TLSv1.3" \
--ssl-ciphers "HIGH:!aNULL"
Use Cases
Zero-downtime deployment
# Deploy new version alongside current
wheels deploy exec --target green
# Verify new deployment
wheels deploy proxy health --backend green
# Switch traffic
wheels deploy proxy switch --to green
# Remove old version
wheels deploy stop --target blue
A/B testing
# Set up A/B test
wheels deploy proxy route \
--backend feature-a --weight 50 \
--backend feature-b --weight 50 \
--cookie "ab_test"
Gradual rollout
# Start with internal users
wheels deploy proxy route \
--rule "ip:10.0.0.0/8" \
--backend app-v2
# Expand to beta users
wheels deploy proxy route \
--rule "header:X-Beta=true" \
--backend app-v2
# Full rollout
wheels deploy proxy switch --to app-v2
Monitoring
The proxy provides metrics for:
Request count and latency
Error rates
Backend health status
Traffic distribution
Connection pool status
View metrics
wheels deploy proxy status --metrics
Export metrics
wheels deploy proxy status --format prometheus > metrics.txt
Best Practices
Always health check: Configure health checks for all backends
Gradual rollouts: Start with small traffic percentages
Monitor metrics: Watch error rates during transitions
Test rollback: Ensure rollback procedures work
Document rules: Keep routing rules well-documented
Use sticky sessions carefully: They can affect load distribution
SSL everywhere: Always use SSL in production
Troubleshooting
Backend not receiving traffic
# Check health status
wheels deploy proxy health --backend app-v2
# Verify routing rules
wheels deploy proxy status --rules
# Check proxy logs
wheels deploy logs --component proxy
High error rates
# Check backend health
wheels deploy proxy health --all
# Reduce traffic to problematic backend
wheels deploy proxy route --backend app-v2 --weight 0
# Investigate logs
wheels deploy logs --grep "proxy error"
See Also
deploy exec - Execute deployment
deploy rollback - Rollback deployment
deploy status - Check deployment status
Last updated
Was this helpful?