FQDNs of Valkey™ hosts
To connect to a host, you need its FQDN (fully qualified domain name). You can get it using one of the following methods:
-
In the management console
, copy the cluster connection command (it contains the host’s FQDN). To get the command, go to the cluster page and click Connect. -
Look up the FQDN in the management console:
- Navigate to the cluster page.
- Navigate to Hosts.
- Copy the Host FQDN column value.
To connect to a non-sharded cluster, you can also use a special FQDN.
Special FQDN
Yandex Managed Service for Valkey™ provides a special FQDN that can be used instead of regular host FQDNs to connect to non-sharded clusters.
In a non-sharded cluster, an FQDN of c-<cluster_ID>.rw.mdb.yandexcloud.net format always points to the current master host. You can get the cluster ID with the list of clusters in the folder. When connecting to this FQDN, you can perform read and write operations.
In multi-host clusters, a special FQDN may temporarily point to a replica host (for up to 10 minutes). This is because it takes time to update DNS records for special FQDNs. If your write request returns an error, repeat it later.
Warning
If automatic failover promotes a host without public access to master, you will not be able to connect to that host from the internet. To avoid this, enable public access for all cluster hosts.
Here is an example of an SSL-encrypted connection to a master host for a cluster with the c9qash3nb1v9******** ID:
redis-cli -h c-c9qash3nb1v9********.rw.mdb.yandexcloud.net \
-p 6380 \
--tls \
--cacert ~/.redis/YandexInternalRootCA.crt \
-a <Valkey™_password>
Warning
Use master host special FQDN-based connections only for processes that can cope with database being unavailable for writing for up to 10 minutes.