Skip to content

DurableJobsOptions

class

Namespace: Orleans.Hosting

Configuration options for the durable jobs feature.
public sealed class DurableJobsOptions

Constructors

Properties

  • ConcurrencySlowStartEnabled Gets 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 at DurableJobsOptions and doubles every DurableJobsOptions until DurableJobsOptions is reached. Default: true.
  • JobStatusPollInterval Gets 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.
  • MaxAdoptedCount Gets 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.
  • MaxConcurrentJobsPerSilo Gets or sets the maximum number of jobs that can be executed concurrently on a single silo. Default: 10,000 × processor count.
  • OverloadBackoffDelay Gets 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.
  • ShardActivationBufferPeriod Gets 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.
  • ShardBatchLingerDelay Gets 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.
  • ShardClaimInitialBudget Gets or sets the maximum number of orphaned shards a silo may claim immediately after startup. The cumulative budget grows linearly from this value to DurableJobsOptions over DurableJobsOptions, 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.
  • ShardClaimMaxBudget Gets 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 between DurableJobsOptions at startup and this value at DurableJobsOptions. Default: 20.
  • ShardClaimRampUpDuration Gets 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 to System.TimeSpan.Zero to disable shard-claim ramp-up entirely. Default: 5 minutes.
  • ShardDuration Gets 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.
  • ShardStripeCount Gets 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.
  • ShouldRetry Gets 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, or null if the job should not be retried. Default: Retry up to 5 times with exponential backoff (2^n seconds).
  • SlowStartInitialConcurrency Gets or sets the initial number of concurrent jobs allowed per silo when slow start is enabled. Concurrency will exponentially increase from this value until DurableJobsOptions is reached. Default: System.Environment.ProcessorCount.
  • SlowStartInterval Gets or sets the interval at which concurrency is doubled during slow start ramp-up. Default: 10 seconds.