Found while moving Tito Pro (Rails) onto Tito's staging CARLOS (v0.34.11, fleet classic, app bae/tito-pro), 2026-11-10.
What happens
waitHealthy (internal/activator/backend_exec.go) does GET http://carlos/ over the instance socket with socketClient, an http.Client with no CheckRedirect. Go's client follows redirects by default.
Pro has config.force_ssl = true and no host authorization, so it answers 301 Location: https://carlos/. The client follows the redirect and starts a TLS handshake on the plain unix socket. Puma logs about 470 lines of HTTP parse error, malformed request ... Are you trying to open an SSL connection to a non-SSL Puma?, and the wake fails:
activator: wake tito-pro.bae.staging.platform.tito.io: start ...: instance not healthy within 2m0s: Get "https://carlos/": http: server gave HTTP response to HTTPS client
The generation is then stopped, and the always-on instance restarts, so it crash-loops (g17→g20 on box-1). The rollout also reports "the copy on the box did not match the release". That message is misleading, because the build is fine.
Over the same socket, Host: tito-pro.bae.staging.platform.tito.io returns 301 without X-Forwarded-Proto and 200 with X-Forwarded-Proto: https.
Tito Classic and Billing, which also use force_ssl, pass only by accident: their Rails host authorization returns 403 for Host: carlos before the SSL redirect runs.
waitHealthyAddr / waitHealthyAddrCtx (internal/activator/backend_unit.go) use a plain http.Client too, so the TCP path has the same behaviour.
Ask
- Don't follow redirects in the health checks (
CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }), so a 3xx counts as healthy under the documented "under 500" rule. - Probably also send
X-Forwarded-Proto: https on the check, as the edge does on real requests, so apps take their normal path. - If
socketClient is shared with anything that should follow redirects, give the health check its own client. - Ideally, report a health-check failure as a health-check failure, not as "the copy on the box did not match the release".
Why it matters
Every Rails app with force_ssl and no host authorization (the Rails default) fails to start as a rootfs app. Tito Pro on CARLOS is blocked on this. Tito chose to wait for a platform fix rather than add assume_ssl app-side.
Tracking on the Tito side: Linear PRO-6933.