Skip to content

Allow publishing per-service healthcheck endpoints - #227

Draft
kevinmcconnell wants to merge 1 commit into
mainfrom
external-health-check-path
Draft

Allow publishing per-service healthcheck endpoints#227
kevinmcconnell wants to merge 1 commit into
mainfrom
external-health-check-path

Conversation

@kevinmcconnell

Copy link
Copy Markdown
Collaborator

When running Kamal Proxy behind downstream load balancers, it can be difficult to route those load balancers' health checks to the correct service if those checks don't carry the correct Host header. (Unfortunately, many cloud load balancers don't allow setting that header in their healthcheck configuration).

To make this easier, we add the ability to publish a service's configured healthcheck at a well-known service-specific path. For example, a service app can be health-checked at /.kamal-proxy/app/health.

To enable the published health check endpoint for a service, set the --publish-health-check flag:

kamal-proxy deploy app --target web-1:3000 --host app1.example.com --publish-health-check

The published health check endpoints are not subject to host checking, TLS requirements, or canonical redirects.

When running Kamal Proxy behind downstream load balancers, it can be
difficult to route those load balancers' health checks to the correct
service if those checks don't carry the correct `Host` header.
(Unfortunately, many cloud load balancers don't allow setting that
header in their healthcheck configuration).

To make this easier, we add the ability to publish a service's
configured healthcheck at a well-known service-specific path. For
example, a service `app` can be health-checked at
`/.kamal-proxy/app/health`.

To enable the published health check endpoint for a service, set the
`--publish-health-check` flag:

    kamal-proxy deploy app --target web-1:3000 \
      --host app1.example.com --publish-health-check

The published health check endpoints are not subject to host checking,
TLS requirements, or canonical redirects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant