PubSub for Multiple Channels

You wouldn’t need to establish a connection for each individual channel, as a PubSub connection isn’t limited to any specific channel, you can listen to topics from different channels on the same connection.

For your example of 100 channels, needing to listen to 1 topic for each, you would need at least 2 PubSub connections, and can listen to 50 topics on each of them. If more channels used your app, you would need to establish additional connections as those first 2 would be full.

The recommendation for simultaneous connections is just a recommendation, and not a requirement, and generally means that any single server should ideally stick within that limit. For client-side apps (such as a PubSub connection in an app running on the broadcasters machine, or in a browser tab) it’s not an issue as they would usually only need a single connection for the few topics they use themselves.

For a server-side app the number of connections would need to scale with the number of users you have, and the recommendation is for 10 connections with a max of 50 topics which would allow you to have 500 topics. That per IP number is just a recommendation though, and you can go beyond that but may run into performance issues, and if your server goes down that’s a lot of connections/topics you need to set up again.