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

fix: simplify the publisher #200

Merged
merged 1 commit into from
Nov 22, 2023
Merged

fix: simplify the publisher #200

merged 1 commit into from
Nov 22, 2023

Conversation

nathanielc
Copy link
Collaborator

@nathanielc nathanielc commented Nov 22, 2023

Prior to this change the publisher attempted to estimate and amortize the DHT publish load over the entire interval. Now we use a simpler AIMD method and then publish batches without any delay. Additionally no estimate metrics are computed instead two simple metrics of how many remaining records need to be published and the amount of time before the deadline. Now operationally you can estimate the lag, buts the code itself is simpler.

Additionally logic was added to not start publishing until kademlia has been bootstrapped.

Finally the dynamic batch size has been capped to min and max sizes to ensure we always make at least some progress and we have a upper bound (for the internal channel) on how large a batch will get.

Copy link
Collaborator

@smrz2001 smrz2001 left a comment

Choose a reason for hiding this comment

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

🚀

Prior to this change the publisher attempted to estimate and amortize
the DHT publish load over the entire interval. Now we use a simpler AIMD
method and then publish batches without any delay. Additionally no
estimate metrics are computed instead two simple metrics of how many
remaining records need to be published and the amount of time before the
deadline. Now operationally you can estimate the lag, buts the code
itself is simpler.

Additionally logic was added to not start publishing until kademlia has
been bootstrapped.
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.

2 participants