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

calculate network size dynamically #512

Closed
lukemarsden opened this issue Aug 19, 2022 · 8 comments
Closed

calculate network size dynamically #512

lukemarsden opened this issue Aug 19, 2022 · 8 comments

Comments

@lukemarsden
Copy link
Contributor

lukemarsden commented Aug 19, 2022

ETA: 2023Q1

new performance improvements require nodes to know a lower bound on the size of the network, currently we hard-code this in #511 but we need to calculate this dynamically. Until we fix this, big networks won't be fast again (since I just changed that number from a hard-coded 250 to a hard-coded 3)

@lukemarsden
Copy link
Contributor Author

262477d

@lukemarsden
Copy link
Contributor Author

we can probably start by just keeping track of how many distinct node ids we've heard from in the last... say, 10 minutes? and use that in our calculation

@lukemarsden
Copy link
Contributor Author

ah but then we should probably also make nodes heartbeat on the network every minute or so so that quiet nodes don't disappear from the calculation

@binocarlos
Copy link
Contributor

the heartbeat could contain info about "here is the capacity that I offer the network" - then we can:

  • know how many nodes there are
  • know how many resources there are across the whole network
  • know how many resources a single node offers
    • this will help requester nodes to accept certain bids based on each nodes reported capacity

@aronchick
Copy link
Collaborator

fascinating problem - how does K8s do this? Do kubelets heartbeat back to apiserver?

@lukemarsden
Copy link
Contributor Author

Via etcd I believe yes

@wdbaruni
Copy link
Collaborator

This should not be a problem once we switch from GossipSub to direct calls for job negotiation

@wdbaruni
Copy link
Collaborator

I am closing this task as we shouldn't solve it since we will drop adding artificial latencies before bidding on jobs

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

No branches or pull requests

4 participants