Table of Contents

Class GracefulDegradationOptions

Namespace
Excalibur.Dispatch.Resilience.Polly
Assembly
Excalibur.Dispatch.Resilience.Polly.dll

Configuration options for graceful degradation.

public sealed class GracefulDegradationOptions
Inheritance
GracefulDegradationOptions
Inherited Members
Extension Methods

Remarks

Follows the Microsoft Options pattern (Polly v8 RetryStrategyOptions as reference). Each degradation level is configured as a DegradationLevelConfig in the Levels list, replacing the previous 21-property flat design.

Properties

EnableAutoAdjustment

Gets or sets a value indicating whether automatic level adjustment is enabled.

public bool EnableAutoAdjustment { get; set; }

Property Value

bool

true to allow the service to adjust degradation levels automatically; otherwise, false.

ErrorRateWindow

Gets or sets the time span over which the auto-degradation error rate is measured.

public TimeSpan ErrorRateWindow { get; set; }

Property Value

TimeSpan

The rolling window for error-rate based auto-degradation. Defaults to one minute. Must be greater than Zero.

Remarks

The error rate fed to auto-degradation is computed over this sliding window (not lifetime totals), so a recent burst of failures triggers degradation even in long-running processes. For continuous coverage it is recommended (but not required) that this be at least HealthCheckInterval; a window shorter than the check cadence leaves an inter-check blind spot but is otherwise valid.

ErrorRateWindowBuckets

Gets or sets the number of buckets the ErrorRateWindow is divided into.

public int ErrorRateWindowBuckets { get; set; }

Property Value

int

The bucket count controlling the granularity at which the rolling window ages out old samples. Defaults to 6. Must be at least 1.

HealthCheckInterval

Gets or sets the interval for health checks.

public TimeSpan HealthCheckInterval { get; set; }

Property Value

TimeSpan

The cadence between health evaluation cycles. Defaults to 30 seconds.

Levels

Gets or sets the degradation level configurations.

public List<DegradationLevelConfig> Levels { get; set; }

Property Value

List<DegradationLevelConfig>

The ordered list of degradation level configurations from least to most severe.

MinimumLevelDuration

Gets or sets the minimum duration to maintain a degradation level.

public TimeSpan MinimumLevelDuration { get; set; }

Property Value

TimeSpan

The minimum time a degradation level remains active before reevaluation. Defaults to one minute.