Open calohmn opened 2 years ago
In Hono 1.x, using the Hono Helm chart, the liveness/readiness probes were done using HTTPS by default, whereas with Hono 2.0, there was a switch to plain HTTP.
Shouldn't this make processing the requests faster rather than slower?
Yes, it makes the observed change in behaviour all the more strange.
Compared with previous Hono versions, HTTP requests on the
/liveness
endpoint of Hono components seem to take longer on Hono 2.0 components. This means the Kubernetes liveness probes run into a timeout more often than before a Hono 2.0 update.This was observed with a liveness probe timeout set to 1s on device-registry-mongodb and (to a lesser extent) hono-service-auth components.
In Hono 2.0, liveness requests get handled via the Quarkus SmallRye Health component. This involves some more overhead compared to the plain vert.x HTTP server implementation before. The question is, in how far this is relevant concerning the observed request durations. Example stacktrace of the invocation of the SmallRye Health
AsyncHealthCheck
handler:Handling switches from a vert.x event-loop-thread to an executor thread here (via
Context.executeBlocking
).The device-registry and hono-service-auth components don't even have specific liveness check actions. The protocol adapters and the Command Router use a "EventLoopBlockedCheck". I'm not sure whether that check is really needed.