Skip to content

Redis socket registry: socket→device→user mappings #191

Description

@codebestia

On authenticated connect, write Redis mappings: socket:{socketId}→{userId,deviceId}, device:{deviceId}→socketId, user:{userId}:devices→{socketIds} (set). Clean on disconnect. Add TTLs refreshed by heartbeat so crashed nodes self-heal. Any gateway node can resolve where to deliver.

Acceptance criteria:

  • Mappings created on connect, removed on disconnect
  • Stale entries expire after missed heartbeats
  • A second gateway node can look up another node's sockets via Redis

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions