Server Settings

## validate\_tcp\_client\_information[​](#validate_tcp_client_information "Direct link to validate_tcp_client_information")

Determines whether validation of client information is enabled when a query packet is received.

By default, it is `false`:

```
<validate_tcp_client_information>false</validate_tcp_client_information>
```

## vector\_similarity\_index\_cache\_max\_entries[​](#vector_similarity_index_cache_max_entries "Direct link to vector_similarity_index_cache_max_entries")

Size of cache for vector similarity index in entries. Zero means disabled.

## vector\_similarity\_index\_cache\_policy[​](#vector_similarity_index_cache_policy "Direct link to vector_similarity_index_cache_policy")

Vector similarity index cache policy name.

## vector\_similarity\_index\_cache\_size[​](#vector_similarity_index_cache_size "Direct link to vector_similarity_index_cache_size")

Size of cache for vector similarity indexes. Zero means disabled.

Note

This setting can be modified at runtime and will take effect immediately.

## vector\_similarity\_index\_cache\_size\_ratio[​](#vector_similarity_index_cache_size_ratio "Direct link to vector_similarity_index_cache_size_ratio")

The size of the protected queue (in case of SLRU policy) in the vector similarity index cache relative to the cache's total size.

## wait\_dictionaries\_load\_at\_startup[​](#wait_dictionaries_load_at_startup "Direct link to wait_dictionaries_load_at_startup")

This setting allows to specify behavior if `dictionaries_lazy_load` is `false`.
(If `dictionaries_lazy_load` is `true` this setting doesn't affect anything.)

If `wait_dictionaries_load_at_startup` is `false`, then the server
will start loading all the dictionaries at startup and it will receive connections in parallel with that loading.
When a dictionary is used in a query for the first time then the query will wait until the dictionary is loaded if it's not loaded yet.
Setting `wait_dictionaries_load_at_startup` to `false` can make ClickHouse start faster, however some queries can be executed slower
(because they will have to wait for some dictionaries to be loaded).

If `wait_dictionaries_load_at_startup` is `true`, then the server will wait at startup
until all the dictionaries finish their loading (successfully or not) before receiving any connections.

**Example**

```
<wait_dictionaries_load_at_startup>true</wait_dictionaries_load_at_startup>
```

## webassembly\_udf\_engine[​](#webassembly_udf_engine "Direct link to webassembly_udf_engine")

The engine used to execute WebAssembly UDFs. Supported values are 'wasmtime' and 'wasmedge'.

## workload\_path[​](#workload_path "Direct link to workload_path")

The directory used as a storage for all `CREATE WORKLOAD` and `CREATE RESOURCE` queries. By default `/workload/` folder under server working directory is used.

**Example**

```
<workload_path>/var/lib/clickhouse/workload/</workload_path>
```

**See Also**

- [Workload Hierarchy](/docs/operations/workload-scheduling#workloads)
- [workload\_zookeeper\_path](#workload_zookeeper_path)

## workload\_zookeeper\_path[​](#workload_zookeeper_path "Direct link to workload_zookeeper_path")

The path to a ZooKeeper node, which is used as a storage for all `CREATE WORKLOAD` and `CREATE RESOURCE` queries. For consistency all SQL definitions are stored as a value of this single znode. By default ZooKeeper is not used and definitions are stored on [disk](#workload_path).

**Example**

```
<workload_zookeeper_path>/clickhouse/workload/definitions.sql</workload_zookeeper_path>
```

**See Also**

- [Workload Hierarchy](/docs/operations/workload-scheduling#workloads)
- [workload\_path](#workload_path)

## zookeeper[​](#zookeeper "Direct link to zookeeper")

Contains settings that allow ClickHouse to interact with a [ZooKeeper](http://zookeeper.apache.org/) cluster. ClickHouse uses ZooKeeper for storing metadata of replicas when using replicated tables. If replicated tables are not used, this section of parameters can be omitted.

The following settings can be configured by sub-tags:

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Setting Description|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `node` ZooKeeper endpoint. You can set multiple endpoints. Eg. `<node index="1"><host>example_host</host><port>2181</port></node>`. The `index` attribute specifies the node order when trying to connect to the ZooKeeper cluster.| `operation_timeout_ms` Maximum timeout for one operation in milliseconds.|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `session_timeout_ms` Maximum timeout for the client session in milliseconds.|  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `root` (optional) The znode that is used as the root for znodes used by the ClickHouse server.|  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `fallback_session_lifetime.min` (optional) Minimum limit for the lifetime of a zookeeper session to the fallback node when primary is unavailable (load-balancing). Set in seconds. Default: 3 hours.|  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `fallback_session_lifetime.max` (optional) Maximum limit for the lifetime of a zookeeper session to the fallback node when primary is unavailable (load-balancing). Set in seconds. Default: 6 hours.|  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | | `identity` (optional) User and password required by ZooKeeper to access requested znodes.|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | `use_compression` (optional) Enables compression in Keeper protocol if set to true.|  |  |  |  | | --- | --- | --- | --- | | `use_xid_64` (optional) Enables 64-bit transaction IDs. Set to `true` to enable extended transaction ID format. Default: `false`.| `pass_opentelemetry_tracing_context` (optional) Enables propagation of OpenTelemetry tracing context to Keeper requests. When enabled, tracing spans will be created for Keeper operations, allowing distributed tracing across ClickHouse and Keeper. Requires `use_xid_64` to be enabled. See [Tracing ClickHouse Keeper Requests](/docs/operations/opentelemetry#tracing-clickhouse-keeper-requests) for more details. Default: `false`. | | | | | | | | | | | | | | | | | | | | | |

There is also the `zookeeper_load_balancing` setting (optional) which lets you select the algorithm for ZooKeeper node selection:

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Algorithm Name Description|  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `random` randomly selects one of ZooKeeper nodes.|  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `in_order` selects the first ZooKeeper node, if it's not available then the second, and so on.|  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | | `nearest_hostname` selects a ZooKeeper node with a hostname that is most similar to the server's hostname, hostname is compared with name prefix.|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | `hostname_levenshtein_distance` just like nearest\_hostname, but it compares hostname in a levenshtein distance manner.|  |  |  |  | | --- | --- | --- | --- | | `first_or_random` selects the first ZooKeeper node, if it's not available then randomly selects one of remaining ZooKeeper nodes.|  |  | | --- | --- | | `round_robin` selects the first ZooKeeper node, if reconnection happens selects the next. | | | | | | | | | | | | | |

**Example configuration**