Kevin McConnell - Introducing Kamal Proxy - Rails World 2024

Learn about Kamal Proxy, a powerful new proxy layer for Rails deployment with zero-downtime updates, HTTP/2, SSL handling, traffic splitting, and performance optimizations.

Key takeaways
  • Kamal Proxy is a new proxy layer built to improve Rails app deployment, replacing Traffic in Kamal 1.0

  • Key features include:

    • Gapless deployments with zero downtime between version updates
    • Built-in HTTP/2 support and request/response buffering
    • Automatic SSL certificate handling
    • Host-based routing for multiple apps on same server
    • X-Sendfile support for faster file serving
    • Built-in HTTP caching via Thruster
  • Rollout functionality allows:

    • Deploying alternate versions alongside main app
    • Controlled traffic splitting based on accounts/percentages
    • Canary deployments and A/B testing
    • Easy rollback with rollout stop command
  • Performance improvements:

    • Static file caching and serving via Thruster
    • Request pausing for maintenance without dropping connections
    • Response buffering to protect against slow clients
    • More efficient asset serving than default Rails
  • Management features:

    • Maintenance mode with custom pages
    • Health checking
    • Simple commands for deployment orchestration
    • Multiple app support with automatic routing
  • Designed for self-hosting with minimal configuration while providing platform-like features normally found in managed services

  • Future roadmap includes:

    • Load balancing improvements
    • WebSocket acceleration
    • Additional performance optimizations