We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
` size_t size = service_list.size();
int begin_index = rand() % size; int rand_index = begin_index; do { ret = mnsc_thrift_client->CreateThriftClient(service_list[rand_index].ip, service_list[rand_index].port, timeout_); if (SUCCESS == ret) { return SUCCESS; } rand_index = (rand_index + 1) % size; } while(rand_index != begin_index); ` 有点疑惑请教下: 这一部分是实现负载均衡策略的吗?一个随机策略?没有加权吗? 但是看portal截图是可以配置服务器权重的,是另外的地方实现了加权负载均衡策略吗?
The text was updated successfully, but these errors were encountered:
可以发下上下文么?哪个文件,多少行之类的?
Sorry, something went wrong.
No branches or pull requests
`
size_t size = service_list.size();
int begin_index = rand() % size;
int rand_index = begin_index;
do {
ret = mnsc_thrift_client->CreateThriftClient(service_list[rand_index].ip,
service_list[rand_index].port,
timeout_);
if (SUCCESS == ret) {
return SUCCESS;
}
rand_index = (rand_index + 1) % size;
} while(rand_index != begin_index);
`
有点疑惑请教下:
这一部分是实现负载均衡策略的吗?一个随机策略?没有加权吗?
但是看portal截图是可以配置服务器权重的,是另外的地方实现了加权负载均衡策略吗?
The text was updated successfully, but these errors were encountered: