LogoLogo
HomeAPIBlog
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
  • INTRODUCTION
    • Getting Started
      • Running Local Development Servers
      • Beginner Tutorial: Hello World
      • Beginner Tutorial: Hello Database
      • Tutorial: Wheels, AJAX, and You
    • Frameworks and Wheels
    • Requirements
    • Manual Installation
    • Upgrading
    • Screencasts
  • Command Line Tools
    • CLI Overview
    • Quick Start Guide
    • Command Reference
      • Core Commands
        • wheels init
        • wheels info
        • wheels reload
        • wheels deps
        • wheels destroy
        • wheels watch
      • Code Generation
        • 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
      • Database Commands
        • wheels dbmigrate info
        • wheels dbmigrate latest
        • wheels dbmigrate up
        • wheels dbmigrate down
        • wheels dbmigrate reset
        • wheels dbmigrate exec
        • wheels dbmigrate create blank
        • wheels dbmigrate create table
        • wheels dbmigrate create column
        • wheels dbmigrate remove table
        • wheels db schema
        • wheels db seed
      • Testing Commands
        • wheels test
        • wheels test run
        • wheels test coverage
        • wheels test debug
      • Configuration Commands
        • wheels config list
        • wheels config set
        • wheels config env
      • Environment Management
        • wheels env
        • wheels env setup
        • wheels env list
        • wheels env switch
      • Plugin Management
        • wheels plugins
        • wheels plugins list
        • wheels plugins install
        • wheels plugins remove
      • Code Analysis
        • wheels analyze
        • wheels analyze code
        • wheels analyze performance
        • wheels analyze security
      • Security Commands
        • wheels security
        • wheels security scan
      • Performance Commands
        • wheels optimize
        • wheels optimize performance
      • Documentation Commands
        • wheels docs
        • wheels docs generate
        • wheels docs serve
      • CI/CD Commands
        • wheels ci init
      • Docker Commands
        • wheels docker init
        • wheels docker deploy
      • Deployment Commands
        • 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
    • CLI Development Guides
      • Creating Commands
      • Service Architecture
      • Migrations Guide
      • Testing Guide
  • Working with Wheels
    • Conventions
    • Configuration and Defaults
    • Directory Structure
    • Switching Environments
    • Testing Your Application
    • Using the Test Environment
    • Contributing to Wheels
    • Submitting Pull Requests
    • Documenting your Code
  • Handling Requests with Controllers
    • Request Handling
    • Rendering Content
    • Redirecting Users
    • Sending Files
    • Sending Email
    • Responding with Multiple Formats
    • Using the Flash
    • Using Filters
    • Verification
    • Event Handlers
    • Routing
    • URL Rewriting
      • Apache
      • IIS
      • Tomcat
      • Nginx
    • Obfuscating URLs
    • Caching
    • Nesting Controllers
    • CORS Requests
  • Displaying Views to Users
    • Pages
    • Partials
    • Linking Pages
    • Layouts
    • Form Helpers and Showing Errors
    • Displaying Links for Pagination
    • Date, Media, and Text Helpers
    • Creating Custom View Helpers
    • Localization
  • Database Interaction Through Models
    • Object Relational Mapping
    • Creating Records
    • Reading Records
    • Updating Records
    • Deleting Records
    • Column Statistics
    • Dynamic Finders
    • Getting Paginated Data
    • Associations
    • Nested Properties
    • Object Validation
    • Object Callbacks
    • Calculated Properties
    • Transactions
    • Dirty Records
    • Soft Delete
    • Automatic Time Stamps
    • Database Migrations
      • Migrations in Production
    • Using Multiple Data Sources
  • Plugins
    • Installing and Using Plugins
    • Developing Plugins
    • Publishing Plugins
  • Project Documentation
    • Overview
  • External Links
    • Source Code
    • Issue Tracker
    • Sponsor Us
    • Community
Powered by GitBook
LogoLogo
On this page
  • Synopsis
  • Description
  • Actions
  • Options
  • Deployment Strategies
  • Blue-Green Deployment
  • Canary Deployment
  • Rolling Deployment
  • Examples
  • Configure proxy settings
  • View proxy status
  • Set up canary deployment
  • Health check configuration
  • Traffic Routing Rules
  • Weight-based routing
  • Header-based routing
  • Geographic routing
  • Proxy Configuration
  • Load balancing
  • Session affinity
  • SSL/TLS settings
  • Use Cases
  • Zero-downtime deployment
  • A/B testing
  • Gradual rollout
  • Monitoring
  • View metrics
  • Export metrics
  • Best Practices
  • Troubleshooting
  • Backend not receiving traffic
  • High error rates
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Deployment Commands

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 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

Previouswheels deploy logsNextwheels deploy push

Last updated 2 days ago

Was this helpful?

- Execute deployment

- Rollback deployment

- Check deployment status

deploy exec
deploy rollback
deploy status