Socket.IO in production: rooms work locally but messages vanish with multiple instances
@devsingh05▲ 9 net votes
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.