Skip to content

Commit

Permalink
Tweaked the ASP.NET Healthcheck docs to be aligned with docs conventions
Browse files Browse the repository at this point in the history
Linked also Async Daemon docs to give more context about HighWaterMark and event progression
  • Loading branch information
oskardudycz committed Aug 29, 2023
1 parent a9a053e commit 4dafe48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/events/projections/healthchecks.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# 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. Read more about events progression tracking and `HighWaterMark` in [Async Daemon documentation](/events/projections/async-daemon).

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
::: tip INFO
The healthcheck will only be checked against `Async` projections
:::

### Example configuration:
## Example configuration:

```cs
// Add HealthCheck
Expand Down

0 comments on commit 4dafe48

Please sign in to comment.