Skip to content

Commit

Permalink
Update clickhouse output readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HeadHunter483 committed Dec 12, 2023
1 parent 4cffccd commit c36bf07
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions plugin/output/clickhouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ It sends the event batches to Clickhouse database using
File.d uses low level Go client - [ch-go](https://github.com/ClickHouse/ch-go) to provide these features.

### Config params
**`addresses`** *`[]any`* *`required`*
**`addresses`** *`[]Address`* *`required`*

TCP Clickhouse addresses, e.g.: 127.0.0.1:9000.
Check the insert_strategy to find out how File.d will behave with a list of addresses.

Also supports another format with weights:

Accepts strings or objects, e.g.:
```yaml
addresses:
- addr: 127.0.0.1:9000
weight: 2
- 127.0.0.1:9000 # the same as {addr:'127.0.0.1:9000',weight:1}
- addr: 127.0.0.1:9001
weight: 1

`addr` is string, `weight` is int defaults to 1.
weight: 2
```
In that case addr will be added to the list <weight> times and for round robin strategy
it will work as weighted round robin. In case if only host is provided, weight will be set to 1.
When some addresses get weight greater than 1 and round_robin insert strategy is used,
it works as classical weighted round robin. Given {(a_1,w_1),(a_1,w_1),...,{a_n,w_n}},
where a_i is the ith address and w_i is the ith address' weight, requests are sent in order:
w_1 times to a_1, w_2 times to a_2, ..., w_n times to a_n, w_1 times to a_1 and so on.
<br>
Expand Down

0 comments on commit c36bf07

Please sign in to comment.