Chat Backend Architecture
High-Level Flow
Core Concepts Connected Socket Authenticated, identified, channel-bound connection
Channel Logical message namespace
Event Fanout Redis-backed pub/sub
Persistence Model Messages stored asynchronously
Hot path is in-memory + Redis
DB is eventual consistency
Failure Modes Redis down → degraded single-node mode
DB down → messages not persisted
Auth failure → socket rejection
Note Current WIP Implimentation of dual WebSockets
chatws.marsuvesvex.xyz:
- Handles the messaging solely related to a users interaction with the systems.
This covers things like Presence, individual chat messages, global chat ‘pinned’ messages, audience polls and other user commands that pertain to the chat system.
- This is currently implimented using Socket.io
live.marsuvesvex.xyz:
- This is Admin/Server side events, that may fan out to all users, but monodirectionaly.
- Events that should be subscribed to by users but triggered by authority accounts.
Last updated on