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

common: improve server load balancing #116

Merged
merged 3 commits into from
Sep 23, 2019
Merged

common: improve server load balancing #116

merged 3 commits into from
Sep 23, 2019

Conversation

ymjiang
Copy link
Member

@ymjiang ymjiang commented Sep 23, 2019

No description provided.

@ymjiang ymjiang changed the title common: improve server load balancing common: improve key distribution Sep 23, 2019
@ymjiang ymjiang changed the title common: improve key distribution common: improve server load balancing Sep 23, 2019
@ymjiang
Copy link
Member Author

ymjiang commented Sep 23, 2019

For a "4 servers" case, the allocation result is

server 0, accumulated workload for this server is 50711832
server 1, accumulated workload for this server is 52251160
server 2, accumulated workload for this server is 51573260
server 3, accumulated workload for this server is 50041932

Using std::hash sometimes does not generate balanced allocation, so just add it as an option.

@ymjiang ymjiang merged commit aa09db8 into master Sep 23, 2019
@ymjiang ymjiang deleted the ps_lb branch September 23, 2019 15:13
@ymjiang ymjiang restored the ps_lb branch September 23, 2019 15:13
@ymjiang ymjiang deleted the ps_lb branch September 23, 2019 15:13
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.

1 participant