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

feat: Peer management with shard as a dimension #1505

Closed
chair28980 opened this issue Aug 24, 2023 · 12 comments
Closed

feat: Peer management with shard as a dimension #1505

chair28980 opened this issue Aug 24, 2023 · 12 comments
Assignees
Labels
E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details enhancement New feature or request

Comments

@chair28980
Copy link
Contributor

If we assume that peer discovery takes care of filtering peers by shard, these peers must now be managed in a way that makes sense in a dynamic auto-sharded environment. Some requirements/ideas:

  • peer store must preferably try to keep at least a target n peers for each subscribed shard (note that dynamically subscribing/unsubscribing from shards could complicate this)
  • peer manager must attempt to maintain a healthy relay connectivity for each subscribed shard
  • a mechanism to perform ad-hoc discovery (or another solution) to cater for when a node subscribes to a shard for which there are no tracked peers

Priority: Critical for launch

@chair28980
Copy link
Contributor Author

waku-org/research#3

@danisharora099 @weboko

Per the research issue, can y'all verify if this is required for JSWaku and assign ownership as necessary. Thank you!

@danisharora099 danisharora099 moved this to Triage in Waku Sep 7, 2023
@fryorcraken fryorcraken added E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details and removed E:2023-1mil-users labels Sep 8, 2023
@weboko
Copy link
Collaborator

weboko commented Sep 21, 2023

Questionable if it belongs more to auto sharding or static sharding.
@chair28980 please, clarify on this.

@fryorcraken
Copy link
Collaborator

Questionable if it belongs more to auto sharding or static sharding. @chair28980 please, clarify on this.

This is more of autosharding because we assume for static sharding that shard do not change mid execution.

@jm-clius
Copy link

Indeed, this is more relevant within the autosharding effort, but is a general enough concept to apply to static sharding as well: if you want to publish to a specific shard (whether statically configured or hashed from content topic via autosharding), you need to have a reasonable set of steps to find an appropriate peer that supports that shard. This could be:
(1) peer that you're already tracking
(2) new discovery process that you kick off until you find a peer (or timeout?) that supports this shard

The epic here (1.4) is the right one.

@weboko weboko moved this from Triage to To Do in Waku Oct 31, 2023
@chair28980 chair28980 moved this from To Do to Priority in Waku Nov 21, 2023
@chair28980
Copy link
Contributor Author

@danisharora099 per discussion in js-waku pm meeting, has this issue been addressed in any of your PRs?

@danisharora099
Copy link
Collaborator

@danisharora099 per discussion in js-waku pm meeting, has this issue been addressed in any of your PRs?

This should be more relevant with the work @adklempner is doing wrt autosharding. Not sure about how exactly this fits in with static sharded peer mgmt. Would be curious for some clarity there.

@chair28980
Copy link
Contributor Author

cc @fryorcraken @jm-clius can you provide context re: Danish's query wrt autosharding above.

@adklempner
Copy link
Member

I can take this on after we merge in the current batch of open PRs (autosharding and peer connectivity)

@danisharora099
Copy link
Collaborator

should mostly be resolved with #1756

@adklempner adklempner moved this from Priority to In Progress in Waku Jan 17, 2024
@adklempner
Copy link
Member

@danisharora099 does it make sense to create an issue for each of the bullet points in OP?

- peer store must preferably try to keep at least a target n peers for each subscribed shard (note that dynamically subscribing/unsubscribing from shards could complicate this)
- peer manager must attempt to maintain a healthy relay connectivity for each subscribed shard
- a mechanism to perform ad-hoc discovery (or another solution) to cater for when a node subscribes to a shard for which there are no tracked peers

I'm not sure if all of these were resolved by your PR

@chair28980 chair28980 added the enhancement New feature or request label Jan 24, 2024
@chair28980
Copy link
Contributor Author

Parent epic here: waku-org/pm#67

@danisharora099
Copy link
Collaborator

a mechanism to perform ad-hoc discovery (or another solution) to cater for when a node subscribes to a shard for which there are no tracked peers

is outside the scope of js-waku for now as we don't allow subscribing to new shards once the node has started

peer manager must attempt to maintain a healthy relay connectivity for each subscribed shard

i dont think this applies to js-waku either considering we aren't prioritizing relay

peer store must preferably try to keep at least a target n peers for each subscribed shard (note that dynamically subscribing/unsubscribing from shards could complicate this)

connection manager currently connects to all relevant found peers -- perhaps an issue could be opened to add a MAX_CAP on these peer connections

@github-project-automation github-project-automation bot moved this from In Progress to Done in Waku Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

6 participants