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

Basic Load Balancer Functionality #239

Merged
merged 15 commits into from
Sep 7, 2023
Merged

Conversation

livingshade
Copy link
Contributor

Why are these changes needed?

Now we support client connect to multiple server ip address and a basic round-robin load balancer that distribute the request accordingly.

Changes

  • Load balancer engine, which stores the connection info and rewrite the conn_id accordingly
  • Mrpclb module, which is mrpc module with load balancer engine
  • An example called load_balancer, you need to start two server first and then start client. Client will send request to each server.

Todos

  • Reuse code of mrpc module in mrpclb module
  • Error info
  • Refactor connection structure

Checks

  • I've run scripts/clippy.sh to lint the changes in this PR.
  • I've included any doc changes.
  • Testing Strategy
    • Release tests
    • This PR is not tested :(

@livingshade
Copy link
Contributor Author

cc @crazyboycjr

@livingshade livingshade marked this pull request as ready for review September 5, 2023 19:46
@crazyboycjr crazyboycjr self-requested a review September 5, 2023 19:59
@livingshade livingshade closed this Sep 6, 2023
@livingshade livingshade reopened this Sep 6, 2023
Copy link
Contributor

@crazyboycjr crazyboycjr left a comment

Choose a reason for hiding this comment

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

Need to merge mrpclb and mrpc. Maybe need some refactoring work on removing cmd_tx/cmd_rx first.

experimental/mrpc/examples/load_balancer/src/server2.rs Outdated Show resolved Hide resolved
experimental/mrpc/mrpc-build/src/client.rs Outdated Show resolved Hide resolved
experimental/mrpc/mrpc-build/src/client.rs Outdated Show resolved Hide resolved
experimental/mrpc/phoenix-api/mrpc/src/cmd.rs Outdated Show resolved Hide resolved
@livingshade
Copy link
Contributor Author

Can you merge this first? I feel like the refactor and message bus requires a lot of code change, and perhaps we should separate it from load balancer.

@crazyboycjr crazyboycjr enabled auto-merge (squash) September 7, 2023 22:57
@crazyboycjr crazyboycjr merged commit 32c15ce into phoenix-dataplane:main Sep 7, 2023
4 checks passed
crazyboycjr pushed a commit that referenced this pull request Dec 4, 2023
* test live update

* update

* update make file

* remove rdma

* update phoenix

* update ratelimt drop

* Basic Load Balancer Functionality (#239)

* example

* backup mrpc engine

* template for lb

* try

* remove addon

* connected control path, in a ad hoc way

* update

* it works 😃

* finish connect

* it worked🥵

* refactor

* work work

* refactor

* fix

* fix trivial

* admission control

* finish admisson control

* metrics

* mutation

* update

* fix version

* server side engines

* add server side impls

* scripts

* update

* fix scripts

* fix

* update ratelimit

* update cargo

---------

Co-authored-by: banruo <banruo@localhost>
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