Loading...

CLI Overview

Quick Start Guide

wheels info

wheels reload

wheels deps

wheels destroy

wheels watch

wheels generate app

wheels generate app-wizard

wheels generate controller

wheels generate model

wheels generate view

wheels generate property

wheels generate route

wheels generate resource

wheels generate api-resource

wheels generate frontend

wheels generate test

wheels generate snippets

wheels scaffold

wheels test

wheels test run

wheels test coverage

wheels test debug

wheels config list

wheels config set

wheels config env

wheels env

wheels env setup

wheels env list

wheels env switch

wheels environment

wheels console

wheels runner

wheels server

wheels server start

wheels server stop

wheels server restart

wheels server status

wheels server log

wheels server open

wheels plugins

wheels plugins list

wheels plugins install

wheels plugins remove

wheels analyze

wheels analyze code

wheels analyze performance

wheels analyze security

wheels security

wheels security scan

wheels optimize

wheels optimize performance

wheels docs

wheels docs generate

wheels docs serve

wheels ci init

wheels docker init

wheels docker deploy

wheels deploy

wheels deploy audit

wheels deploy exec

wheels deploy hooks

wheels deploy init

wheels deploy lock

wheels deploy logs

wheels deploy proxy

wheels deploy push

wheels deploy rollback

wheels deploy secrets

wheels deploy setup

wheels deploy status

wheels deploy stop

Configuration Management

Creating Commands

Service Architecture

Migrations Guide

Testing Guide

Ask or search...
Ctrl K
Loading...

deploy proxy (Coming Soon)

This command may not work as expected. A complete and stable version is coming soon.

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 configuration
  • route - Manage traffic routing rules
  • health - Check proxy and backend health
  • switch - Switch traffic between deployments
  • rollback - Revert proxy to previous configuration
  • status - 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

  1. Always health check: Configure health checks for all backends
  2. Gradual rollouts: Start with small traffic percentages
  3. Monitor metrics: Watch error rates during transitions
  4. Test rollback: Ensure rollback procedures work
  5. Document rules: Keep routing rules well-documented
  6. Use sticky sessions carefully: They can affect load distribution
  7. 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