No shared session directory: cross-pod session operations fail #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context: multi-replica stateless deployment (two 2-replica apps,
cheeztvandfafflix, each one PostgreSQL plus valkey, no sticky sessions). Not a 12.0 regression — live in the deployed build. Tracking: #12.Problem
Emby.Server.Implementations/Session/SessionManager.cs:64-67keeps_activeConnectionsprocess-local, with no shared record of which pod owns which session.The WebSocket connection itself is legitimately process-local. The gap is the directory, not the connection.
Proposal
Publish a session → owning-pod directory to valkey: session id, user, device, owning pod identity, with a TTL refreshed by the existing session heartbeat. Route a command for a non-local session to the owning pod rather than dropping it — either a valkey pub/sub channel per pod, or direct pod-to-pod HTTP using the directory entry. Pub/sub avoids needing pod-addressable networking.
This is a prerequisite for #17 (SyncPlay) and #20 (live WebSocket notifications).
Acceptance
PostgreSqlTestServerintests/Jellyfin.Server.Testsand run in thepostgres-migration-chainWoodpecker step (JELLYFIN_TEST_POSTGRES). In-memory providers have hidden different semantics and are how three bugs reached production.unkin-agent referenced this issue2026-09-24 22:49:01 +10:00