HTTP/2 Cleartext Config Seems Incompatible with Health Check Feature
complete
S
Sven
In order to migrate seamlessly from HTTP/1.1 to HTTP/2 cleartext (rationale), I went through the following steps:
- I kept my HTTP/1.1 server on port 8080 and added a secondary h2c server on port 8081. The deployment was fine.
- I edited the app spec via the web frontend to change the service's port from 8080 to 8081 and add protocol: HTTP2as outlined in the documentation.
- Unfortunately the deployment failed as it looks like the health check was never successful.
Here's what I got from the deployment log:
> Sep 12 10:26:59 ERROR failed health checks after 12 attempts with error Readiness probe failed: Get "http://<private-ip-address>:8081/v1/health-check": net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\f\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00d\x00\x06\x00\x00@\x00\x00\x00\b\a\x00\x00\x00\x00\x00\x7f\xff\xff\xff\x00\x00\x00\x01"
Is it possible the health check feature doesn't support h2c yet?
Kate Erickson
Absolutely! Here are links to the updated articles:
- How to Set Up and Manage Health Checks: https://docs.digitalocean.com/products/app-platform/how-to/manage-health-checks/.
- How to Configure HTTP/2: https://docs.digitalocean.com/products/app-platform/how-to/configure-http2/
S
Sven
Hej Kate, Dan. Do you mind adding a link to the updated documentation? This will both make it easier for me to find it as well as and future client filing this ticket via search engines. Thanks a lot
Dan Finn
updated the status to
complete
Kate Erickson
Thank you for your feedback! The App Platform docs have been updated to specify that HTTP health checks use HTTP/1.1 (not h2c), and I've added guidance to use
health_check.port
with internal_ports
for a separate HTTP/1.1 listener, or to omit http_path
for a TCP check.S
Sven
As a workaround, expose
8080
in internal_ports
and explicitly specify services[].health_check.port: 8080
.While it works, I think it's cleaner to allow the health check endpoint to use h2c as well.