Health Feature
The Health Feature provides simple baseline liveness and readiness probes for the MILTON API.
Business Logic Intent
In a distributed environment orchestrated by Aspire and deployed via Kubernetes or Azure Container Apps, infrastructure layers rely on explicit signals to determine if a given container is healthy and ready to serve traffic. This module provides a fast, unauthenticated HTTP endpoint returning the literal status of the application logic.
Currently, this endpoint returns a static "Operational" response. This acts as an initial bridge for FastEndpoints discovery, but is intended to be expanded into deeper semantic health checks (e.g. verifying database connections via Entity Framework or checking RabbitMQ connectivity) utilizing the built-in .NET Health Checks framework injected by MILTON.ServiceDefaults.
Architecture & Integration
This endpoint is registered entirely globally and does not undergo Tenant authorization or strict RBAC policy checks. It acts as a transparent window for orchestration systems.
Mermaid Sequence Diagram
sequenceDiagram autonumber actor Load Balancer / Aspire participant API as HealthEndpoint Load Balancer / Aspire->>API: GET /health (Unauthenticated) API->>API: Evaluate internal readiness API-->>Load Balancer / Aspire: 200 OK { "status": "Operational" }
Modules and Components
Endpoints
HealthEndpoint: Exposes theGET /healthroute utilizingFastEndpoints. Configured viaAllowAnonymous()to ensure monitoring agents are never blocked by authorization policies.
DTOs
HealthRequest: Placeholder request marker.HealthResponse: Carries theStatusstring for health evaluation.