Files
git.stella-ops.org/docs/features/unchecked/gateway/router-heartbeat-and-health-monitoring.md

1.3 KiB

Router Heartbeat and Health Monitoring

Module

Gateway

Status

IMPLEMENTED

Description

Heartbeat protocol with configurable intervals, HealthMonitorService for stale instance detection, ping latency tracking with exponential moving average, Draining health status for graceful shutdown, and automatic instance removal on missed heartbeats.

Implementation Details

  • Health monitor service: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayHealthMonitorService.cs -- stale instance detection, heartbeat tracking
  • Health check middleware: src/Gateway/StellaOps.Gateway.WebService/Middleware/HealthCheckMiddleware.cs -- health endpoint processing
  • Gateway metrics: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayMetrics.cs -- latency tracking, connection metrics
  • Gateway hosted service: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayHostedService.cs -- connection lifecycle management
  • Options: src/Gateway/StellaOps.Gateway.WebService/Configuration/GatewayOptions.cs -- configurable heartbeat intervals
  • Source: batch_51/file_23.md

E2E Test Plan

  • Verify heartbeat protocol detects stale instances
  • Test configurable heartbeat intervals
  • Verify Draining status for graceful shutdown
  • Test automatic instance removal on missed heartbeats