FQDNs of ClickHouse® hosts
To connect to a host, you need its fully qualified domain name (FQDN). You can use the FQDN of a particular host in the cluster or a special FQDN always pointing to the available host.
Here is a host FQDN example:
rc1a-goh2a9tr********.mdb.yandexcloud.net
Getting a host FQDN
There are several ways to get a ClickHouse® host FQDN:
-
Look up the FQDN in the management console:
- Navigate to the cluster page.
- Navigate to Hosts.
- Copy the Host FQDN column value.
-
In the management console
, copy the command for connecting to the cluster. This command contains the host FQDN. To get the command, go to the cluster page and click Connect. -
Get the list of cluster hosts using the CLI or API.
Special FQDN
If you do not want to manually connect to another host when the current one becomes unavailable, use a special FQDN.
Warning
Use special FQDN-based connections only for processes that allow up to 10 minutes of database write downtime.
Special FQDNs can be in one of the following formats:
-
c-<cluster_ID>.rw.mdb.yandexcloud.net: To connect to an available cluster host. -
<shard_name>.c-<cluster_ID>.rw.mdb.yandexcloud.net: To connect to an available shard host.
Warning
If, during cluster maintenance, a special FQDN points to a host without public access, you will not be able to connect to the cluster from the internet. To avoid this, enable public access for all cluster hosts.
A special FQDN may temporarily point to an unavailable host (for up to 10 minutes). This is because it takes time to update DNS records for special FQDNs. If your request returns an error, repeat it later.
ClickHouse® is a registered trademark of ClickHouse, Inc