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

Reobservation rate-limit #1621

Merged
merged 3 commits into from Sep 22, 2022
Merged

Conversation

jynnantonix
Copy link
Contributor

Add rate-limiting for sending out re-observation requests and also make the receiver non-blocking.

We currently run the cleanup loop every 30 seconds, which means that
once 5 minutes have passed for an observation without quorum we will
send out re-observation requests to the p2p network every 30 seconds.

This is a bit excessive so limit sending these requests out to once
every 5 minutes.
The per-watcher channels for reobservation requests don't have a
buffer, which means that if sending on any one channel blocks then _all_
reobservation requests get blocked.  Make the send fallible and log if
it blocks instead.
@jynnantonix jynnantonix force-pushed the pr/jynnantonix/rate-limit-reobservations branch from 1bbbb8e to 360811f Compare September 20, 2022 10:19
bruce-riley
bruce-riley previously approved these changes Sep 20, 2022
Change-Id: I59743a605c92bbff82789c5d981dca882be8bbbe
@hendrikhofstadt
Copy link
Contributor

Added buffers to chain specific channels so we're not dropping too aggressively

@evan-gray evan-gray merged commit eaa1012 into dev.v2 Sep 22, 2022
@evan-gray evan-gray deleted the pr/jynnantonix/rate-limit-reobservations branch September 22, 2022 19:22
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

5 participants