Provides Microsoft Orleans host environment statistics (an IHostEnvironmentStatistics
implementation) for AWS Elastic Container Service (ECS). This enables load shedding when silos are overloaded and silo metrics (CPU and memory) in the Orleans Dashboard.
This implementation relies on the ECS Task Metadata Endpoint V3. This endpoint is available to all tasks running on the following AWS platforms:
- EC2 launch type with container agent version 1.21.0 or later
- Fargate launch type on platform version 1.3.0 or later
This endpoint may also be made available to containers running locally (for development and testing purposes) using the Amazon ECS Local Container Endpoints.
This is published as a Nuget package and depends on Orleans 3.0 (or greater).
<PackageReference Include="Orleans.TelemetryConsumers.ECS" Version="1.0.0" />
Install-Package Orleans.TelemetryConsumers.ECS -Version 1.0.0
dotnet add package Orleans.TelemetryConsumers.ECS --version 1.0.0
paket add Orleans.TelemetryConsumers.ECS --version 1.0.0
First, ensure your ECS tasks are running on a supported platform (see the introduction for EC2 and Fargate platform requirements). If running on an unsupported platform, the host environment statistics will be unavailable.
Second, register the ECS IHostEnvironmentStatistics
implementation and its dependencies:
new SiloHostBuilder()
.UseEcsTaskHostEnvironmentStatistics()
.Build();