dank-twitch-irc icon indicating copy to clipboard operation
dank-twitch-irc copied to clipboard

Load-based scaling

Open RAnders00 opened this issue 3 years ago • 4 comments

Create new connections when lots of messages need to be sent

RAnders00 avatar Dec 22 '20 23:12 RAnders00

Is this in order to sent messages faster than the default Twitch enforced interval of 100ms by distributing the messages across multiple connections? Why can't messages just be queued on a single connection?

5E7EN avatar Dec 23 '20 01:12 5E7EN

Yes, it's a thing larger bots might work if they consistently have to send messages faster than 100ms intervals. The messages could back up faster than they can be sent. This also seems useful for usages like mass-banning bots or similar.

RAnders00 avatar Dec 23 '20 14:12 RAnders00

This is a fair request, however there's one main issue I've experienced in the past while working with similar configurations - and that is, messages being sent out of order (which I assume is because of clients fluctuating in latency; along with not actually confirming message delivery) - as seen here: https://i.imgur.com/qaNe9JN.gif (supposed 10-width pyramid).

5E7EN avatar Dec 23 '20 23:12 5E7EN

@5E7EN @RAnders00 Perhaps creating message groups where messages within the group must be processed on a single connection and then create a connection if no connection can support the size of the group? Solves the out of order issue as you could then just wrap all the messages that need to be sent in order in a MessageGroup.

TroyKomodo avatar Dec 27 '20 07:12 TroyKomodo