> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing information about clusters available in the config file and the servers defined in them.

# system.clusters

<h2 id="description">
  Description
</h2>

Contains information about clusters available in the config file and the servers in them.

<h2 id="Columns">
  Columns
</h2>

* `cluster` ([String](/reference/data-types)) — The cluster name.
* `shard_num` ([UInt32](/reference/data-types)) — The shard number in the cluster, starting from 1.
* `shard_name` ([String](/reference/data-types)) — The name of the shard in the cluster.
* `shard_weight` ([UInt32](/reference/data-types)) — The relative weight of the shard when writing data.
* `internal_replication` ([UInt8](/reference/data-types)) — Flag that indicates whether this host is a part on ensemble which can replicate the data on its own.
* `replica_num` ([UInt32](/reference/data-types)) — The replica number in the shard, starting from 1.
* `host_name` ([String](/reference/data-types)) — The host name, as specified in the config.
* `host_address` ([String](/reference/data-types)) — The host IP address obtained from DNS.
* `port` ([UInt16](/reference/data-types)) — The port to use for connecting to the server.
* `is_local` ([UInt8](/reference/data-types)) — Flag that indicates whether the host is local.
* `user` ([String](/reference/data-types)) — The name of the user for connecting to the server.
* `default_database` ([String](/reference/data-types)) — The default database name.
* `errors_count` ([UInt32](/reference/data-types)) — The number of times this host failed to reach replica.
* `slowdowns_count` ([UInt32](/reference/data-types)) — The number of slowdowns that led to changing replica when establishing a connection with hedged requests.
* `estimated_recovery_time` ([UInt32](/reference/data-types)) — Seconds remaining until the replica error count is zeroed and it is considered to be back to normal.
* `database_shard_name` ([String](/reference/data-types)) — The name of the `Replicated` database shard (for clusters that belong to a `Replicated` database).
* `database_replica_name` ([String](/reference/data-types)) — The name of the `Replicated` database replica (for clusters that belong to a `Replicated` database).
* `is_shared_catalog_cluster` ([UInt8](/reference/data-types)) — Bool indicating if the cluster belongs to shared catalog.
* `is_active` ([Nullable(UInt8)](/reference/data-types)) — The status of the Replicated database replica (for clusters that belong to a Replicated database): 1 means 'replica is online', 0 means 'replica is offline', NULL means 'unknown'.
* `unsynced_after_recovery` ([Nullable(UInt8)](/reference/data-types)) — Indicates if a Replicated database replica has replication lag more than max\_replication\_lag\_to\_enqueue after creating or recovering the replica.
* `replication_lag` ([Nullable(UInt32)](/reference/data-types)) — The replication lag of the `Replicated` database replica (for clusters that belong to a Replicated database).
* `recovery_time` ([Nullable(UInt64)](/reference/data-types)) — The recovery time of the `Replicated` database replica (for clusters that belong to a Replicated database), in milliseconds.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT * FROM system.clusters LIMIT 2 FORMAT Vertical;
```

```text title="Response" theme={null}
Row 1:
──────
cluster:                 test_cluster_two_shards
shard_num:               1
shard_name:              shard_01
shard_weight:            1
replica_num:             1
host_name:               127.0.0.1
host_address:            127.0.0.1
port:                    9000
is_local:                1
user:                    default
default_database:
errors_count:            0
slowdowns_count:         0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active:               NULL

Row 2:
──────
cluster:                 test_cluster_two_shards
shard_num:               2
shard_name:              shard_02
shard_weight:            1
replica_num:             1
host_name:               127.0.0.2
host_address:            127.0.0.2
port:                    9000
is_local:                0
user:                    default
default_database:
errors_count:            0
slowdowns_count:         0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active:               NULL
```

<h2 id="see-also">
  See also
</h2>

* [Table engine Distributed](/reference/engines/table-engines/special/distributed)
* [distributed\_replica\_error\_cap setting](/reference/settings/session-settings#distributed_replica_error_cap)
* [distributed\_replica\_error\_half\_life setting](/reference/settings/session-settings#distributed_replica_error_half_life)
