Table of Contents

Class ResourceHealthChecker

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Health checker that evaluates resource utilization against configured thresholds.

public sealed class ResourceHealthChecker : ITyphonHealthCheck
Inheritance
ResourceHealthChecker
Implements
Inherited Members

Remarks

The health checker uses a "worst-of-all" pattern: the overall status is determined by the single most severe status across all resources. This ensures that one critical resource doesn't get lost among many healthy ones.

Default thresholds:

  • General: 80% degraded, 95% unhealthy
  • WALRingBuffer: 60% degraded, 80% unhealthy (critical for durability)
  • TransactionPool: 60% degraded, 80% unhealthy (critical for throughput)

Constructors

ResourceHealthChecker(ResourceMetricsExporter, ObservabilityBridgeOptions)

Creates a new ResourceHealthChecker.

public ResourceHealthChecker(ResourceMetricsExporter exporter, ObservabilityBridgeOptions options)

Parameters

exporter ResourceMetricsExporter

The metrics exporter to read snapshots from.

options ObservabilityBridgeOptions

Configuration options containing custom thresholds.

Methods

CheckHealth()

Perform a quick health check, returning only the status.

public HealthStatus CheckHealth()

Returns

HealthStatus

Current health status.

Remarks

This is optimized for frequent polling (e.g., Kubernetes liveness probes). Uses FindMostUtilized() for O(n) complexity.

GetDetailedResult()

Perform a detailed health check with diagnostic information.

public HealthCheckResult GetDetailedResult()

Returns

HealthCheckResult

Detailed health check result including metrics data.

Remarks

Provides additional context for debugging and dashboards:

  • The resource with highest utilization
  • All resources above degraded threshold
  • Contention hotspots