Skip to content

random robin by source ip#53

Open
bufferflies wants to merge 2 commits intotikv:rs-releasefrom
bufferflies:load-balance
Open

random robin by source ip#53
bufferflies wants to merge 2 commits intotikv:rs-releasefrom
bufferflies:load-balance

Conversation

@bufferflies
Copy link
Copy Markdown

In same case, the server may connect the grpc with the same cq, such as :
client 1: [1,1,2,2,0]
client 2: [0,3,3,4,4]

In the global view, every cq has two connection. But in the client view, they only use the two cq.

Signed-off-by: bufferflies <1045931706@qq.com>
// next pollset to assign a channel to
gpr_atm next_pollset_to_assign = 0;
// next pollset to assign a channel to, it is a map from pollset name to ip address.
std::map<std::string, gpr_atm> next_pollset_to_assign_ids;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should remove entry when a connection disconnected.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

no, it records all connection's ip not one connection. such as
ip1: 11
ip2: 12

Signed-off-by: bufferflies <1045931706@qq.com>
@bufferflies bufferflies requested a review from overvenus January 8, 2024 02:52
LykxSassinator added a commit to LykxSassinator/grpc that referenced this pull request Mar 6, 2024
Derived from: tikv#53

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
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