Getting a Sharded Cluster's Connection Details

Get the private IPs you use to connect to a sharded cluster.

Unlike non-sharded clusters, sharded clusters don't have primary or replica endpoints at the cluster level that you use to connect to the cluster. Instead, the sharded cluster has private endpoints to each shard's node. For reliability purposes, we recommend that you specify the primary node private endpoint for three of the cluster's shards in your application's connection code. The endpoint identifies the shard and node that the endpoint connects to, using the following endpoint pattern:

<ID>-<shard_number>-<node_number>.redis.<region_ID>.oci.oraclecloud.com

The <node_number> in a primary node's endpoint is always 1. For example, the following endpoint is for the second shard's primary node, for a sharded cluster in the us-phoenix-1 region:

<Unique_ID>-2-1.redis.us-phoenix-1.oci.oraclecloud.com
    1. Open the navigation menu and click Databases. Under OCI Cache, click Clusters.

    2. Under List scope, select the compartment that contains the cluster.

    3. In the Clusters list, click the name of the cluster that you want to connect to.

    4. Under Resource, in the Cluster nodes list, find the primary node for the cluster's shards.

    5. In the Private endpoint column, click Show to display the full value for a field in the Console, and click Copy to copy the value.

  • Use the oci redis list-redis-cluster-nodes command and required parameters to get the node details for a cluster:

    oci redis node-summary list-redis-cluster-nodes --redis-cluster-id cluster_ocid [OPTIONS]
    For information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see the CLI Command Reference.
  • For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

    Run the ListRedisClusterNodes operation to get the node details for a cluster.