Class FlowServerOptions
- Namespace
- FlowOrchestrator.Core.Configuration
- Assembly
- FlowOrchestrator.Core.dll
Configuration for the server registry: how often each process writes its heartbeat to IFlowServerStore, when the dashboard calls a server stale, and when its row is purged. Applied via Servers.
public sealed class FlowServerOptions
- Inheritance
-
FlowServerOptions
- Inherited Members
Remarks
A server is stale once its latest heartbeat is older than StaleAfter (HeartbeatInterval × MissedHeartbeatsBeforeStale, 45 s by default): it crashed, hangs, or cannot reach the store. A process that stops gracefully removes its own row; a stale one is removed by whichever replica purges next, once it has been silent for PurgeAfter.
Fields
DefaultHeartbeatInterval
The default for HeartbeatInterval: 15 seconds.
public static readonly TimeSpan DefaultHeartbeatInterval
Field Value
DefaultMissedHeartbeatsBeforeStale
The default for MissedHeartbeatsBeforeStale: 3.
public const int DefaultMissedHeartbeatsBeforeStale = 3
Field Value
DefaultPurgeAfter
The default for PurgeAfter: 1 hour.
public static readonly TimeSpan DefaultPurgeAfter
Field Value
MaxHeartbeatInterval
The longest accepted HeartbeatInterval: 10 minutes.
public static readonly TimeSpan MaxHeartbeatInterval
Field Value
MinHeartbeatInterval
The shortest accepted HeartbeatInterval: 1 second.
public static readonly TimeSpan MinHeartbeatInterval
Field Value
Properties
Enabled
When false, this process neither registers nor heartbeats, and is absent from the Servers view. Default true.
public bool Enabled { get; set; }
Property Value
HeartbeatInterval
How often the process writes its heartbeat.
public TimeSpan HeartbeatInterval { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Thrown when set below MinHeartbeatInterval or above MaxHeartbeatInterval.
MissedHeartbeatsBeforeStale
How many consecutive heartbeats a server may miss before the dashboard shows it as stale.
public int MissedHeartbeatsBeforeStale { get; set; }
Property Value
Remarks
At least 2, so one slow store round trip never flips a live server to stale.
Exceptions
- ArgumentOutOfRangeException
Thrown when set below 2 or above 100.
PurgeAfter
Age of the latest heartbeat beyond which a server's row is deleted. Must be longer than StaleAfter, so a stale server stays visible for a while before it disappears.
public TimeSpan PurgeAfter { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Thrown when set to zero or a negative value.
RuntimeName
Runtime name this process reports (Hangfire, InMemory, ServiceBus). Set by
UseHangfire(), UseInMemoryRuntime() and UseAzureServiceBusRuntime(); a custom runtime
may set its own. When null, the name is derived from the registered
IStepDispatcher type (its name without the StepDispatcher suffix).
public string? RuntimeName { get; set; }
Property Value
StaleAfter
Age of the latest heartbeat beyond which a server is shown as stale: HeartbeatInterval × MissedHeartbeatsBeforeStale.
public TimeSpan StaleAfter { get; }