September 21st, 2024

A brief look at the new Kamal Proxy

Kamal 2 introduces kamal-proxy to replace Traefik, simplifying Docker container deployment with features like automatic TLS certificates, host-based routing, and minimal user configuration for enhanced functionality and user experience.

Read original articleLink Icon
A brief look at the new Kamal Proxy

Kamal 2 introduces a new custom proxy, kamal-proxy, to replace Traefik, aiming to simplify the deployment process for Docker containers. Kamal, designed for straightforward container management, initially relied on Traefik for zero-downtime deployments. However, Traefik's complexity and the need for a special cord file for health checks led to the decision to develop a more streamlined solution. The new kamal-proxy allows users to deploy services with a simple command structure, specifying the service and target host, while automatically managing traffic routing and health checks. It also supports hosting multiple applications on the same server without port conflicts and can issue TLS certificates for secure connections. The configuration for the new proxy is integrated into Kamal's deployment files, minimizing user intervention. Key features of the kamal-proxy include host-based routing, automatic TLS certificates via Let’s Encrypt, request buffering, and enhanced request management capabilities. This transition aims to enhance user experience by reducing complexity and improving functionality in deploying web applications.

- Kamal 2 replaces Traefik with a simpler custom proxy called kamal-proxy.

- The new proxy facilitates zero-downtime deployments and automatic TLS certificate issuance.

- Users can deploy multiple applications on the same server without port conflicts.

- The configuration is streamlined, requiring minimal user input.

- New features include request buffering and maintenance mode capabilities.

Link Icon 6 comments
By @emmanueloga_ - 3 months
Makes sense ... most languages have solid libraries to work with HTTP, which can eliminate the need for a third-party standalone proxy. A DIY solution sounds nice as it could be customized to meet any specific (and/or crazy :-p) features required.

Here's a C# project in the same vein: [1].

--

1: https://github.com/microsoft/reverse-proxy/tree/main/samples...

By @pqdbr - 3 months
Great writeup. Do you plan to update your Kamal handbook to version 2?
By @wmf - 3 months
By @tosh - 3 months
I'm currently using Traefik for compression (gzip, brotli, …) does Kamal-Proxy handle that as well or do Rails apps handle compression somewhere else?
By @euph0ria - 3 months
Does it support http/3?