diff --git a/docs/modules/ngx_http_upstream_vnswrr_module.md b/docs/modules/ngx_http_upstream_vnswrr_module.md index 823a3dc4df..1435c8f2f1 100644 --- a/docs/modules/ngx_http_upstream_vnswrr_module.md +++ b/docs/modules/ngx_http_upstream_vnswrr_module.md @@ -62,10 +62,10 @@ Enable `vnswrr` load balancing algorithm. - max_init The max number of virtual node per initialization, to avoid initializing too many virtual nodes in one request. - + In very large clusters, setting this argument can significantly reduce the time overhead of a single request. - There is two another rules of `max_init`: + There are two additional rules of `max_init`: 1. If `max_init` is not set or `0`, it will be adjusted to the number of peers. 2. If `max_init` is greater than total weight of peers, it will be adjusted to the total weight of peers. @@ -95,20 +95,20 @@ http { ## Performance -In the same pressure environment (wrk, 500 concurrency, keepalive, 2000 endpoint), the CPU consumption of `VNSWRR` algorithm accounts for `0.27%` ( `ngx_http_upstream_get_vnswrr`). +Under the same pressure (wrk, 500 concurrency, keepalive, 2000 endpoint), the CPU consumption of `VNSWRR` algorithm accounts for `0.27%` ( `ngx_http_upstream_get_vnswrr`). Compared with `VNSWRR` algorithm, the CPU consumption of `SWRR` (`ngx_http_upstream_get_peer` `39%`) is an order of magnitude higher than `VNSWRR`. ![image](/docs/image/vnswrr_vs_swrr_fhot.png) -In the above environment, the QPS of `VNSWRR` increases by `60%` compared with `SWRR` algorithm. +In the above environment, the QPS of `VNSWRR` increased by `60%` compared with `SWRR` algorithm. ![image](/docs/image/vnswrr_vs_swrr_2000.png) Observing the changes of QPS and RT in the different back-end number scenarios. -Under SWRR algorithm, when the number of back-end for every 500 addition, then the QPS of Nginx decreases by about 10% and RT increases by about 1 ms. But under the VNSWRR algorithm, QPS and RT do not change much. +Under SWRR algorithm, with every 500 back-end servers added, the QPS of Nginx decreases by about 10% and RT increases by about 1 ms. But under the VNSWRR algorithm, QPS and RT do not change much. ![image](/docs/image/vnswrr_vs_swrr_qps.png)