We’re soon moving to a load-balanced NodeJS environment and thinking about how our socket/emit messages will reach all servers. We’ve moved to a single Redis server (DO) to manage all sessions (instead of one per app server). Does Wappler’s socket.io offer some way of broadcasting to all servers or is this something we’d need to wrap up in some other way ?
At the moment we have a single Redis server to manage session state. It’s not configured in any way for our sockets. Happy using the one server but how to ensure it’s managing th sockets is the question - does Wappler offer way to configure it this way?
Yeah, Wapplers default behavior works fine. I use a DO redis cluster for sockets as well and 32 containers for the application. It works without any issues.
@scalaris The 32 containers are just one middleware of the application. The amount of ram always depends on what runs in the containers. These 32 containers each have two GB of ram assigned and a single core because they handle chromium-related tasks and never open more than two browser instances with a single tab each.
I’m considering moving away from DOs managed Redis databases and self-hosting them because their managed option has limitations. The same goes for Postgres, where the managed option is limited due to licensing. https://www.dragonflydb.io/ is interesting as well, and I’m currently testing it because I will need to scale the application further soon.