Unverified Commit 0e758d3c authored by Ge Jun's avatar Ge Jun Committed by GitHub

Merge pull request #280 from cdjingit/master

添加wrr的文档说明
parents 8cb64c66 b1e23a19
......@@ -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.
......
docs/images/register_lb.png

47.5 KB | W: | H:

docs/images/register_lb.png

17 KB | W: | H:

docs/images/register_lb.png
docs/images/register_lb.png
docs/images/register_lb.png
docs/images/register_lb.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment