How many channels can you join?

Hi,

In different places on the web, I found that people generally limit themselves to 20 channels per connection.
I tried myself and successfully joined the top 1000 Twitch channels on a single connection, reliably getting all events and chat messages for all those channels.

So other than the fact that if you lose your connection you need half an hour to rejoin all those channels due to rate limiting of commands, why limit a connection to 20 channels? What problems will I have choosing, for example, 50 channels per connection?

Thanks

Becuase the problem isn’t the number of channels you join.

The problem is the number of messages that could theoretically be sent.

You can join 1000 dead/quiet channels fine.
But you can’t join say all 50 of the “Top” streamers channels.

Twitch will disconnect you in the number of messages in the queue to be sent to you is too great.

A message here is not a chat message but any RAW packet of data from the server.
Usernotices, notices, timeouts, /me privmsg etc.

Sure you may have joined 1000 channels without issue, Twitch doesn’t enforce a limit.
You just may have a problem if 1000 people start talking in all 1000 of those channels at the same time.

As that is nearly 2,000,000 messages, (the message and extra notice/tag data that may occur or be sent in a separate message) you need to consume relatively quickly, or get force disconnected due to large buffer/message queue.

That’s why you should NOT join too many channels on one connection.

Strange that I haven’t been disconnected from those 1000 channels for 4 straight hours. I guess it’s a whole different story in case of an event or something.

It’s hard to balance how many connections and channels per connection to have, given the various rate limits. I’m currently trying to figure out at which rate I can open connections, because I guess opening 20 connections all at once isn’t a good idea.

And how it solved in many channels bots?
Many connections?

It’s a case of channel content over channel quantity.

That said, theres no practical reason to join THAT MANY channels really.

@ee_man you’d have to ask their devs. I know how I’d do it, but I don’t know how they do it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.