Class ClusterClientProvider

Assembly: redb.Tsak.Web.Pro.dll

Cluster implementation of .
Reads topology from the redb cluster tree, manages per-node HTTP clients (a quick client for
polling and a patient one for control operations — force-stop/restart drain longer than the
5s default; review 2026-09-02, С12). Cordon/uncordon and node removal go through a worker's
AUDITED API endpoints whenever a node is reachable, with the direct DB write only as an
explicit last-resort fallback (review 2026-09-02, С10).

public sealed class ClusterClientProvider : INodeClientProvider, IDisposable

Inheritance

Object→ClusterClientProvider

Implements

Properties

IsCluster

True if running in cluster mode (multi-cluster topology from the redb object store).

public bool IsCluster { get; }

Topology

Current topology snapshot (may be null before first load).

public ClusterTopology? Topology { get; }

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetClient(string)

Get HTTP client for a specific node.

public TsakApiClient? GetClient(string nodeId)

GetControlClient(string)

Client for CONTROL operations (force-stop, context restart/stop, module ops) — they can

public TsakApiClient? GetControlClient(string nodeId)

LoadTopologyAsync(bool)

Load or refresh topology.

public Task<ClusterTopology> LoadTopologyAsync(bool forceRefresh = false)

RemoveNodeAsync(string)

Remove a dead node from cluster registry. No-op in standalone.

public Task<bool> RemoveNodeAsync(string nodeId)

SetCordonedAsync(string, bool)

Cordon (true) or uncordon (false) a node for planned maintenance.

public Task<bool> SetCordonedAsync(string nodeId, bool cordoned)

Constructors