Skip to content

Commit

Permalink
PR Comments fixed reg. Docs of HealthCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
daveHylde authored and oskardudycz committed Aug 29, 2023
1 parent 4f89877 commit a9a053e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"upcasting",
"upcaster",
"Upcasters",
"helpdesk"
"helpdesk",
"HealthCheck",
"HealthChecks"
],
"ignoreWords": [
"JSONB",
Expand Down
8 changes: 6 additions & 2 deletions docs/events/projections/healthchecks.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Async Daemon HealthChecks

Marten supports a customizable [HealthChecks](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-7.0). This can be useful when running the async daemon in a containerized environment such as Kubernetes. The check will verify that no projection's progression lags more than `maxEventLag` behind the `HighWaterMark`. The default `maxEventLag` is 100.
Marten supports a customizable [HealthChecks](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-7.0). This can be useful when running the async daemon in a containerized environment such as Kubernetes. The check will verify that no projection's progression lags more than `maxEventLag` behind the `HighWaterMark`. The default `maxEventLag` is 100.

> The healthcheck will only be checked against `Async` projections
The `maxEventLag` setting controls how far behind the `HighWaterMark` any async projection is allowed to lag before it's considered unhealthy. E.g. if the `HighWaterMark` is 1000 and an a system with 3 async projections `ProjA`, `ProjB` and `ProjC` are processed respectively to sequence number 899, 901 and 901 then the system will be considered unhealthy with a `maxEventLag` of 100 (1000 - 899 = 101), BUT healthy with a `mavEventLag` of 101 or higher.

> NOTE: The healthcheck will only be checked against `Async` projections
### Example configuration:

```cs
// Add HealthCheck
Expand Down

0 comments on commit a9a053e

Please sign in to comment.