Knowledge Base updated: 2026-11-17
Kamal Proxy knowledge base
Orientation
Kamal Proxy is a Go reverse proxy and service-control plane used to route incoming HTTP(S) traffic to registered upstream services and targets.
The proxy process owns listener configuration, routing middleware, TLS certificate handling, target selection, request error handling, metrics, and structured request logging. Service and target state is managed through its control API.
The operator CLI drives deployment and day-two operations through that control API. The repository also includes a Compose-based local environment for exercising the proxy against a sample upstream application.
Architecture
flowchart LR
Client[Client]
TLS[TLS listeners / certificates]
Router[HTTP router and middleware]
Request[Request identification, buffering, timeouts]
ServiceAPI[Service control API]
Registry[Service registry]
Targets[Upstream targets]
Controls[Pause and rollout controls]
Balancer[Load balancer]
Upstream[Upstream service]
Errors[Error response middleware]
Metrics[Metrics instrumentation]
Logs[Request logging]
CLI[Operator CLI]
Compose[Local Compose environment]
Client --> TLS --> Router --> Request --> Balancer --> Upstream
Router --> Errors
Request --> Metrics
Request --> Logs
ServiceAPI --> Registry --> Targets
Registry --> Controls
Controls --> Balancer
Targets --> Balancer
CLI --> ServiceAPI
Compose --> TLS
Compose --> Upstream
Glossary
- Service — A registered proxy workload with routing and operational configuration.
- Target — An individual upstream endpoint eligible to receive a service's traffic.
- Control API — The proxy interface used by the CLI to register and operate services and targets.
- Rollout state — Runtime state used to control how traffic reaches service targets during deployment.
- On-demand certificate — A TLS certificate obtained or selected when a served domain requires it.
Routing table
- Proxy startup, listener configuration, or top-level proxy composition -> docs/proxy-server.md
**/*router*,**/*middleware*, request buffering, request body limits, or client-address handling -> docs/request-routing.md**/*service*,**/*target*, service registration, or target health/state -> docs/service-and-target-lifecycle.md**/*balanc*, target selection, or upstream eligibility -> docs/load-balancing.md- Traffic pausing, progressive rollout, or rollout-state changes -> docs/traffic-controls.md
**/*tls*,**/*cert*, HTTPS listener configuration, or certificate acquisition -> docs/tls-and-certificates.md**/*error*, client-facing proxy failures, or embedded error pages -> docs/proxy-error-responses.md**/*cli*, command hierarchy, or proxy control API client changes -> docs/operator-cli.md- Deploy-command changes, service registration during deployment, or deployment target setup -> docs/service-deployment.md
- Service list/run/stop/remove/pause/resume commands or operational rollout controls -> docs/service-operations.md
- Runtime instrumentation, operational signals, or observability integration -> docs/observability.md
**/*metric*, metric registration, or metrics exposure -> docs/proxy-metrics.md**/*log*, request-log fields, or request-context log propagation -> docs/request-logging.md- compose*.yml, docker-compose*.yml, local proxy configuration, or sample upstream application changes -> docs/local-development-environment.md