Skip to content
Browse files
Merge pull request #280 from cdjingit/master
  • Loading branch information
jamesge committed Mar 28, 2018
2 parents 8cb64c6 + b1e23a1 commit 0e758d3c4aff4a54eafe937d31281c7750b4d97a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
@@ -152,6 +152,10 @@ int main() {
即round robin,总是选择列表中的下一台服务器,结尾的下一台是开头,无需其他设置。比如有3台机器a,b,c,那么brpc会依次向a, b, c, a, b, c, ...发送请求。注意这个算法的前提是服务器的配置,网络条件,负载都是类似的。
### wrr
即weighted round robin, 根据服务器列表配置的权重值来选择服务器。服务器被选到的机会正比于其权重值,并且该算法能保证同一服务器被选到的结果较均衡的散开。
### random
随机从列表中选择一台服务器,无需其他设置。和round robin类似,这个算法的前提也是服务器都是类似的。
@@ -152,6 +152,10 @@ The ideal algorithm is to make every request being processed in-time, and crash
which is round robin. Always choose next server inside the list, next of the last server is the first one. No other settings. For example there're 3 servers: a,b,c, brpc will send requests to a, b, c, a, b, c, … and so on. Note that presumption of using this algorithm is the machine specs, network latencies, server loads are similar.
### wrr
which is weighted round robin. Choose the next server according to the configured weight. The chances a server is selected is consistent with its weight, and the algorithm can make each server selection scattered.
### random
Randomly choose one server from the list, no other settings. Similarly with round robin, the algorithm assumes that servers to access are similar.
BIN -30.5 KB (36%) docs/images/register_lb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0e758d3

Please sign in to comment.