提交 30c02d52 编写于 作者: B BayoNet

DOCAPI-6421: prefer_localhost_replica docs.

上级 b88c8c43
......@@ -497,11 +497,11 @@ The default value is 7500.
The smaller the value, the more often data is flushed into the table. Setting the value too low leads to poor performance.
## load_balancing
## load_balancing {#settings-load_balancing}
Specifies the algorithm of replicas selection that is used for distributed query processing.
Performing the distributed query in replicated setup, ClickHouse should define an order that will be used for sending the query to replicas. ClickHouse supports the following algorithms of choosing replicas:
ClickHouse supports the following algorithms of choosing replicas:
- [Random](#load_balancing-random) (by default)
- [Nearest hostname](#load_balancing-nearest_hostname)
......@@ -551,6 +551,17 @@ This algorithm chooses the first replica in order or a random replica if the fir
The `first or random` algorithm solves the problem of the `in order` algorithm. The problem is: if one replica goes down, the next one handles twice the usual load while remaining ones handle usual traffic. When using the `first or random` algorithm, the load on replicas is leveled.
## prefer_localhost_replica {#settings-prefer_localhost_replica}
Enables/disables preferable using the localhost replica when processing distributed queries.
Possible values:
- 1 — ClickHouse always sends a query to the localhost replica if it exists.
- 0 — ClickHouse uses the balancing strategy specified by the [load_balancing](#settings-load_balancing) setting.
Default value: 1.
## totals_mode
How to calculate TOTALS when HAVING is present, as well as when max_rows_to_group_by and group_by_overflow_mode = 'any' are present.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册