From 09641c1fabcd8781f59428aacc5dfcb522fda0e3 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 21 May 2026 01:32:03 +0200 Subject: [PATCH] Keep root health check as liveness probe --- doc/wiki/health-checks.md | 2 ++ src/apps/Elsa.Server.Web/Program.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/wiki/health-checks.md b/doc/wiki/health-checks.md index a36d567a4..e8d9f5fca 100644 --- a/doc/wiki/health-checks.md +++ b/doc/wiki/health-checks.md @@ -49,6 +49,8 @@ app.MapHealthChecks("/health/ready", new() }); ``` +The reference server also keeps `/` process-liveness compatible for existing probes by mapping it with `Predicate = _ => false`, the same as `/health/live`. Use `/health/ready` for checks that should return `503` while the runtime is paused, draining, or dependency-degraded. + ## Current Elsa Readiness Checks - `elsa-runtime`: creates a workflow runtime client and reports `Degraded` when the runtime is paused or draining, because it is process-up but not accepting new work. diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs index dddf8ea85..0623e9103 100644 --- a/src/apps/Elsa.Server.Web/Program.cs +++ b/src/apps/Elsa.Server.Web/Program.cs @@ -186,6 +186,7 @@ app.MapHealthChecks("/health/ready", new() }); app.MapHealthChecks("/", new() { + Predicate = _ => false, ResultStatusCodes = { [HealthStatus.Degraded] = StatusCodes.Status503ServiceUnavailable,