DurableJobsOptions
class
Namespace: Orleans.Hosting
Configuration options for the durable jobs feature.
public sealed class DurableJobsOptionsConstructors
Properties
ConcurrencySlowStartEnabledGets or sets whether concurrent job slow start is enabled. When enabled, job concurrency is gradually increased during startup to avoid starvation issues that can occur before caches, connection pools, and thread pool sizing have warmed up. Concurrency starts atDurableJobsOptionsand doubles everyDurableJobsOptionsuntilDurableJobsOptionsis reached. Default:true.JobStatusPollIntervalGets or sets the delay before polling an asynchronous durable job handler again. The job continues holding its concurrency slot while it is polled. Default: 1 second.MaxAdoptedCountGets or sets the maximum number of times a shard can be adopted from a dead owner before being marked as poisoned. A shard that repeatedly causes silos to crash will exceed this threshold as it bounces between owners. When the next adoption would cause the adopted count to exceed this value, the shard is considered poisoned and will no longer be assigned to any silo. Default: 3.MaxConcurrentJobsPerSiloGets or sets the maximum number of jobs that can be executed concurrently on a single silo. Default: 10,000 × processor count.OverloadBackoffDelayGets or sets the delay between overload checks when the host is overloaded. Job batch processing will pause for this duration before rechecking the overload status. Default: 5 second.ShardActivationBufferPeriodGets or sets how far in advance (before the shard's start time) the shard should begin processing. This prevents holding idle shards for extended periods. Default: 5 minutes.ShardBatchLingerDelayGets or sets the maximum amount of time the shard operation processor will wait for additional mutations to join an in-flight batch after the first one arrives.ShardClaimInitialBudgetGets or sets the maximum number of orphaned shards a silo may claim immediately after startup. The cumulative budget grows linearly from this value toDurableJobsOptionsoverDurableJobsOptions, after which the limit is removed entirely. This prevents a freshly started silo from overwhelming itself by claiming all orphaned shards at once during disaster-recovery scenarios. Default: 2.ShardClaimMaxBudgetGets or sets the total number of orphaned shards the silo is allowed to have claimed by the end of the shard-claim ramp-up period. The cumulative budget is linearly interpolated betweenDurableJobsOptionsat startup and this value atDurableJobsOptions. Default: 20.ShardClaimRampUpDurationGets or sets the duration of the shard-claim ramp-up period after silo activation. While the silo has been running for less than this duration, the number of orphaned shards it may claim is limited by a linearly increasing budget. Once this period elapses the silo claims all available orphaned shards without limit. Set toSystem.TimeSpan.Zeroto disable shard-claim ramp-up entirely. Default: 5 minutes.ShardDurationGets or sets the duration of each job shard. Smaller values reduce latency but increase overhead. For optimal alignment with hour boundaries, choose durations that evenly divide 60 minutes (e.g., 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, or 60 minutes) to avoid bucket drift across hours. Default: 1 hour.ShardStripeCountGets or sets the number of writable shards to use for each shard time bucket. Increasing this value distributes jobs with the same due-time bucket across multiple shard journals. Default: 1.ShouldRetryGets or sets the function that determines whether a failed job should be retried and when. The function receives the job context and the exception that caused the failure, and returns the time when the job should be retried, ornullif the job should not be retried. Default: Retry up to 5 times with exponential backoff (2^n seconds).SlowStartInitialConcurrencyGets or sets the initial number of concurrent jobs allowed per silo when slow start is enabled. Concurrency will exponentially increase from this value untilDurableJobsOptionsis reached. Default:System.Environment.ProcessorCount.SlowStartIntervalGets or sets the interval at which concurrency is doubled during slow start ramp-up. Default: 10 seconds.
