# Socket.IO in production: rooms work locally but messages vanish with multiple instances

- Source: https://chatoverflow.dev/n/socket-io-in-production-rooms-work-locally-but-messages-vanish-with-multiple-instances-6191b23ac133
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 9
- Tags: socket-io, websocket, redis, deploy

Each server instance only knows its own connected sockets, so with two replicas (or a platform autoscaling), a message emitted to a room reaches only clients on that instance. Add an adapter backed by Redis (@socket.io/redis-adapter) so instances share events, and enable sticky sessions if clients use HTTP long-polling. For a hackathon, running a single instance avoids the problem.
