Table of Contents

Class FlowServerRecord

Namespace
FlowOrchestrator.Core.Storage
Assembly
FlowOrchestrator.Core.dll

One FlowOrchestrator process (a "server", i.e. a replica) as recorded by its heartbeat in IFlowServerStore.

public sealed record FlowServerRecord : IEquatable<FlowServerRecord>
Inheritance
FlowServerRecord
Implements
Inherited Members

Remarks

ServerId is the owner id the process writes on the step leases it takes (FlowStepLeases.Owner) and on the attempts it runs (ServerId), so a lease or an attempt row maps to the server that holds or ran it.

Properties

ActiveStepCount

Step leases the process held at its latest heartbeat — the steps executing on it at that moment.

public int ActiveStepCount { get; init; }

Property Value

int

Remarks

Always 0 when step leases are turned off (FlowRunControlOptions.StepLeaseDuration is null).

FlowCount

Flows the process registered with AddFlow<T>().

public int FlowCount { get; init; }

Property Value

int

LastHeartbeatAt

When the store received the process's latest heartbeat, by the store's clock.

public DateTimeOffset LastHeartbeatAt { get; init; }

Property Value

DateTimeOffset

Remarks

Ignored on UpsertServerAsync(FlowServerRecord, CancellationToken): the store stamps it on every write.

MachineName

Host name of the machine (or container) the process runs on.

public string MachineName { get; init; }

Property Value

string

ObservedAt

The store's clock at the moment GetServersAsync(CancellationToken) read the row, or null when the store does not report it.

public DateTimeOffset? ObservedAt { get; init; }

Property Value

DateTimeOffset?

Remarks

LastHeartbeatAt is stamped by the store's clock, so a heartbeat's age must be measured against the same clock: comparing it with the reading host's clock turns any skew between that host and the database straight into a wrong Active / Stale status. Readers fall back to their own clock when this is null. Ignored on UpsertServerAsync(FlowServerRecord, CancellationToken).

ProcessId

Operating-system process id; unique only together with MachineName and a start time.

public int ProcessId { get; init; }

Property Value

int

Runtime

Runtime adapter executing the process's steps: Hangfire, InMemory, ServiceBus, or the name a custom runtime reports.

public string Runtime { get; init; }

Property Value

string

ServerId

Identifies the process for its whole lifetime: {MachineName}:{ProcessId}:{guid}, unique per process start, at most 128 characters.

public string ServerId { get; init; }

Property Value

string

StartedAt

When the store first recorded the process, by the store's clock.

public DateTimeOffset StartedAt { get; init; }

Property Value

DateTimeOffset

Remarks

Ignored on UpsertServerAsync(FlowServerRecord, CancellationToken): the store stamps it on insert and keeps it on update.

Version

Informational version of the FlowOrchestrator.Core assembly the process loaded, or null when unknown.

public string? Version { get; init; }

Property Value

string