Skip to content

Conversation

@hannahhoward
Copy link
Collaborator

@hannahhoward hannahhoward commented Sep 13, 2022

Goals

See how much simpler we can make the load balancer by removing the routing protocol as well as forwarding responses for inbound forwarding requests

Implementation

  • Remove the routing protocol, instead relying on a set peer config. (map of peer ID -> list of protocol IDs)
    • On peer connect, if peer is service node in the peer config, start listening on peers list of protocols, making the route "active"
    • On peer disconnect, if peer is service node in the peer config, stop listening on peers list of protocols
    • Makes code for both libp2p load balancer and service node much simpler, particularly service node (overall this PR has net 500 less LoC, which includes most complicated concurrency stuff - and that's without updatings tests, which will get shorter)
  • Also remove forwarding response for inbound requests
    • not sure how big a win this really is -- just a few deletions as a result

@hannahhoward hannahhoward requested a review from dirkmc September 13, 2022 22:47
Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

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

Nice! Looks like a good simplification 👍

@hannahhoward hannahhoward force-pushed the feat/libp2p-loadbalancer branch from c2a6247 to a7d2b67 Compare September 16, 2022 00:00
@nonsense nonsense deleted the feat/libp2p-loadbalancer-simplified branch January 17, 2023 15:29
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.

3 participants