Showbot icon indicating copy to clipboard operation
Showbot copied to clipboard

Implement Rate limiting

Open rikai opened this issue 9 years ago • 8 comments

Currently there is no concept of rate limiting in the bot, this needs to be addressed alongside #40.

rikai avatar Aug 08 '16 16:08 rikai

Turns out cinch has rate limiting already and this too

We just need to add the config option and decide what a good default value is.

rikai avatar Aug 20 '16 01:08 rikai

Based on the channel modes on #JupiterBroadcasting, I would suggest the following settings:

  • messages_per_second: 1 (JBot can't send more than half of the messages in any given 5-second window)
  • server_queue_size: 5 (The hard limit is 10, so half that seems reasonable)

s0ph0s-dog avatar May 27 '17 18:05 s0ph0s-dog

Mmm, keep in mind that JBot also talks in PMs, so this has to account for throughput for that as well, not ONLY the channel.

rikai avatar May 27 '17 19:05 rikai

That's a good point.
However, there haven't been any other suggestions… perhaps we could implement these numbers, then tweak them if they seem too conservative?

s0ph0s-dog avatar May 27 '17 21:05 s0ph0s-dog

Sounds fine to me. 👍

rikai avatar May 27 '17 22:05 rikai

Should I submit a PR that adds these settings to cinchize.yml.example?

s0ph0s-dog avatar May 28 '17 22:05 s0ph0s-dog

Yes please

rikai avatar May 28 '17 22:05 rikai

leaving this open until i can 100% confirm it works. 👍

rikai avatar Jun 01 '17 16:06 rikai