Class ConnectionStoreOptions
- Namespace
- Virtufin.WebSocketManager.Configuration
- Assembly
- Virtufin.WebSocketManager.dll
Tuning for connection record state-store TTL. The WSM sets a Dapr
ttlInSeconds on every connection record write.
ConnectionHeartbeatService refreshes it for
every locally-owned, connected connection every TTL/3 seconds
(floored at 10s), independent of send traffic; a successful
Send/SendRaw also refreshes it as a side effect.
Records whose TTL elapses (e.g. a pod that died without a clean
disconnect, so nothing is heartbeating them anymore) are removed
by the state store without explicit reclaimer intervention.
public sealed record ConnectionStoreOptions : IEquatable<ConnectionStoreOptions>
- Inheritance
-
ConnectionStoreOptions
- Implements
- Inherited Members
Fields
ConnectionRecordTtlSecondsEnvVar
Env var for ConnectionRecordTtlSeconds.
public const string ConnectionRecordTtlSecondsEnvVar = "CONNECTION_RECORD_TTL_SECONDS"
Field Value
DefaultConnectionRecordTtlSeconds
Default connection record TTL (5 minutes).
public const int DefaultConnectionRecordTtlSeconds = 300
Field Value
MaxConnectionRecordTtlSeconds
Maximum allowed TTL in seconds. Upper bound to keep state growth bounded if the reclaimer sweep is disabled.
public const int MaxConnectionRecordTtlSeconds = 3600
Field Value
MinConnectionRecordTtlSeconds
Minimum allowed TTL in seconds. Lower bound to keep connections from disappearing during normal long-polling activity.
public const int MinConnectionRecordTtlSeconds = 30
Field Value
Properties
ConnectionRecordTtlSeconds
Connection record TTL in seconds.
public int ConnectionRecordTtlSeconds { get; init; }
Property Value
Methods
FromEnvironment(Func<string, string?>)
public static ConnectionStoreOptions FromEnvironment(Func<string, string?> getEnvironment)