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

add basic rate limiting to consul api calls #1279

Merged
merged 1 commit into from Sep 10, 2019
Merged

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented Sep 9, 2019

Rate limit all API calls to Consul to ~1/100ms to keep consul-template
from flooding consul-agent with requests. This takes the idea from #1066
and simplifies it by making it work this way by default instead of
making it a configurable option.

Closes #1066

@eikenb eikenb requested review from a team September 9, 2019 22:24
@eikenb eikenb added this to the 0.22.0 - Community PR focused milestone Sep 9, 2019
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Rate limit all API calls to Consul to ~1/100ms to keep consul-template
from flooding consul-agent with requests. This takes the idea from #1066
and simplifies it by making it work this way by default instead of
making it a configurable option.

Closes #1066
@eikenb
Copy link
Contributor Author

eikenb commented Sep 10, 2019

If any more complex rate limiting is needed, we should probably switch to https://godoc.org/golang.org/x/time/rate, but this is fine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants