Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttle send-msg for IRC to prevent flooding. #111

Merged
merged 1 commit into from Oct 15, 2019
Merged

Throttle send-msg for IRC to prevent flooding. #111

merged 1 commit into from Oct 15, 2019

Conversation

sarg
Copy link
Contributor

@sarg sarg commented Oct 14, 2019

Allow 1 request per second with burstiness up to 5.
Use log/warn when server reports flooding.

Seems that 1 rps is the default setting for IRC protocol. I've played with different throttling strategies on freenode using !range 20 | xargs echo and seems that current one is pretty safe.

Allow 1 request per second with burstiness up to 5.
Use log/warn when server reports flooding.
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #111 into master will decrease coverage by 0.03%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
- Coverage   43.76%   43.73%   -0.04%     
==========================================
  Files          90       90              
  Lines        3578     3583       +5     
  Branches      166      166              
==========================================
+ Hits         1566     1567       +1     
- Misses       1846     1850       +4     
  Partials      166      166
Impacted Files Coverage Δ
src/yetibot/core/adapters/irc.clj 24.3% <33.33%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ab9114...1dab216. Read the comment docs.

@devth
Copy link
Member

devth commented Oct 14, 2019

@sarg this looks great! Will test it out later today.

@devth
Copy link
Member

devth commented Oct 15, 2019

Played with this, it's awesome. I didn't find any official docs on allows rps on freenode but I think 1 rps is pretty safe, though it is a bit slow. Might be something we make configurable.

Thanks for the PR!

@devth devth merged commit 5066036 into yetibot:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants