00d0765152
Publish every session to valkey with the instance holding it, and route a command for a non-local session to its owner over a per-instance pub/sub channel. Entries expire, so a dead instance leaves the directory.
24 lines
859 B
C#
24 lines
859 B
C#
namespace MediaBrowser.Controller.Session;
|
|
|
|
/// <summary>
|
|
/// Configuration options for the session directory and the cross-instance bus that goes with it.
|
|
/// </summary>
|
|
public sealed class SessionDirectoryOptions
|
|
{
|
|
/// <summary>
|
|
/// The configuration section these options bind from.
|
|
/// </summary>
|
|
public const string ConfigurationSection = "Jellyfin:SessionDirectory";
|
|
|
|
/// <summary>
|
|
/// Gets or sets how long in seconds a published entry survives without being refreshed. An instance
|
|
/// that dies stops refreshing, so its sessions leave the directory after this long.
|
|
/// </summary>
|
|
public int EntryTtlSeconds { get; set; } = 60;
|
|
|
|
/// <summary>
|
|
/// Gets or sets how often in seconds an instance republishes the sessions it holds.
|
|
/// </summary>
|
|
public int RefreshIntervalSeconds { get; set; } = 20;
|
|
}
|