Table of Contents

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

TimeSpan

DefaultMissedHeartbeatsBeforeStale

The default for MissedHeartbeatsBeforeStale: 3.

public const int DefaultMissedHeartbeatsBeforeStale = 3

Field Value

int

DefaultPurgeAfter

The default for PurgeAfter: 1 hour.

public static readonly TimeSpan DefaultPurgeAfter

Field Value

TimeSpan

MaxHeartbeatInterval

The longest accepted HeartbeatInterval: 10 minutes.

public static readonly TimeSpan MaxHeartbeatInterval

Field Value

TimeSpan

MinHeartbeatInterval

The shortest accepted HeartbeatInterval: 1 second.

public static readonly TimeSpan MinHeartbeatInterval

Field Value

TimeSpan

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

bool

HeartbeatInterval

How often the process writes its heartbeat.

public TimeSpan HeartbeatInterval { get; set; }

Property Value

TimeSpan

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

int

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

TimeSpan

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

string

StaleAfter

Age of the latest heartbeat beyond which a server is shown as stale: HeartbeatInterval × MissedHeartbeatsBeforeStale.

public TimeSpan StaleAfter { get; }

Property Value

TimeSpan