-
Notifications
You must be signed in to change notification settings - Fork 35
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A proxy-wide health check route #28
Comments
Hi! I've encountered the same problem and would be happy to contribute to solving it. Before Kamal v2.0, I resolved this issue using Traefik labels to route traffic based on specific User-Agent headers. Since I have both a FE and BE applications hosted on the same server, I need to separate my health checks:
I believe we should add an option that allows routing based on headers and paths, not just the host, as I don’t see any other way to handle managed load balancers' health checks due to the limited request information they provide. Alternatively, we could add a way to easily expose the container port, like |
As a workaround for now, you can deploy the smallest (around 80Kb) image https://hub.docker.com/r/lipanski/docker-static-website without the |
Thank you! I temporarily changed the range (200-499) of my health checks since it’s pointless anyway, but I didn’t know that image exists. :)) |
Help me understand the problem here. The proxy/ssl|host settings are only relevant when you're running with a single box. Why would there be a load balancer in front then? |
The problem is that almost all balancers allow to define only an HTTP path and port as a healthcheck. This works well when you have a single app on the host. Imagine yourself having a balancer. It sends a Currently, kamal-proxy will respond with HTTP 404, which makes sense because it will not wind a container to route traffic to. The idea is to add a default traffic point like |
Running into this with the upgrade to 2.0 (very excited to drop Traefik!). With Kamal 1*, we have TLS terminating on our load balancers (AWS ELB), however, we maintained TLS right through to hosts using self signed certificates with Traefik. This ensures traffic is encrypted from client => load balancer => host. In some ways you're right, it doesn't make sense to leverage Kamal Proxy's auto SSL stuff in this setup, but it would be nice to support encryption across all network hops whilst keeping the proxy set up simple. #17 might address this scenario, but still requires setting a host (as far as I can tell). Not sure it will work with something like the following. Will test this once kamal supports the custom TLS stuff that appears to now be supported in Kamal Proxy. proxy:
ssl: true
ssl_certificate: /....
ssl_private_key: /...
hosts: * |
I have applications deployed horizontally, with three web app servers behind an AWS ALB, which handles SSL termination and health checks. The ALB health check request looks like this:
unfortunately, there is no option to add custom headers (like |
This is related to the issue I submitted in the kamal repo: I think the solution should be to add a "default" host to the proxy. Useful also when you want an app to show when you visit the IP address. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Cloud load balancers like AWS ALB or DigitalOcean droplet balancer does not allow specifying HOST header that is getting sent to the instance. In a multi-application setup, this means two things:
proxy: { host: nil }
setting.Based on these two facts, I suggest adding an ability to specify a proxy-wide health check route that will work for all instances.
The text was updated successfully, but these errors were encountered: