title: Content

text:
You can integrate Redis Software with Prometheus and tools such as [Grafana](), [Datadog](), [Dynatrace](), or [New Relic]() to create dashboards for important metrics.

As of Redis Software version 7.8.2, [PromQL (Prometheus Query Language)](https://prometheus.io/docs/prometheus/latest/querying/basics/) metrics are available. V1 metrics are deprecated but still available.

To transition from v1 metrics to v2 metrics, you need to change the `metrics_path` in your Prometheus configuration file from `/` to `/v2` to use the new scraping endpoint.

Here's an example of the updated scraping configuration in `prometheus.yml`:

[code example]

You can scrape both v1 and v2 endpoints simultaneously during the transition period to prepare dashboards and ensure a smooth transition.

You can use the following tables to transition from v1 metrics to equivalent v2 PromQL. For a list of all available v2 metrics, see [Prometheus metrics v2]().

code:
scrape_configs:
  # Scrape Redis Software
  - job_name: redis-enterprise
    scrape_interval: 30s
    scrape_timeout: 30s
    metrics_path: /v2
    scheme: https
    tls_config:
      insecure_skip_verify: true
    static_configs:
      - targets: ["<cluster_name>:8070"]

section_id: content


title: Prometheus metrics v2

summary: V2 metrics available to Prometheus as of Redis Software version 7.8.2.

page_type: content

title: Content

role: content

text:
You can integrate Redis Software with Prometheus and tools such as [Grafana](), [Datadog](), [Dynatrace](), or [New Relic]() to create dashboards for important metrics.

The v2 metrics in the following tables are available as of Redis Software version 7.8.0. For help transitioning from v1 metrics to v2 PromQL, see [Prometheus v1 metrics and equivalent v2 PromQL]().

The v2 scraping endpoint also exposes metrics for `node_exporter` version 1.8.1. For more information, see the [Prometheus node_exporter GitHub repository](https://github.com/prometheus/node_exporter).


title: Redis Software observability and monitoring guidance

summary: Using monitoring and observability with Redis Software

page_type: index


title: Metrics and alerts for monitoring v1

summary: Monitor Redis Software clusters and databases using internal monitoring systems and external monitoring tools.

title: Current monitoring system (deprecated)

role: overview

text:
The current monitoring system, which is deprecated as of Redis Software version 7.22, consists of the following components:

- Internal metrics storage:

    - Metrics are internally aggregated, calculated, and stored for up to one year.

    - This historical data is used to generate trends and performance insights over time.

- [Statistics APIs]():

    - This set of RESTful APIs exposes metrics collected at regular intervals from clusters, nodes, databases, shards, and endpoints.

    - These APIs allow customers to retrieve performance and usage statistics directly from the internal storage layer.

- Cluster manager metrics and alerts:

    - The Cluster Manager UI includes [dedicated metrics pages](#cluster-manager-metrics) that display pre-aggregated metrics.

    - [Cluster alerts](#cluster-alerts) are triggered based on thresholds applied to these stored metrics.

- v1 Prometheus scraping endpoint:

    - Redis Software exposes a legacy `/prometheus_metrics` endpoint to integrate with external observability platforms like [Prometheus and Grafana]().

    - This endpoint fetches data from the internal storage, providing basic monitoring integration.

title: Limitations

role: limits

text:
The internal monitoring system, while functional, has several limitations that affect scalability and accuracy:

- **Limited granularity:** Metrics are aggregated before storage, resulting in a loss of fine-grained insights.

- **Stale data:** Stored metrics can lag behind real-time system states, reducing the effectiveness of alerting.

- **Visibility gaps during management operations:** Metrics and statistics may not be available or updated during management tasks, resulting in incomplete monitoring during critical activities.

- **Scalability constraints:** Internal storage and processing introduce performance overhead and are not optimized for large-scale observability pipelines.

- **Limited extensibility:** The system is tightly coupled with internal components, making it difficult to integrate with modern monitoring ecosystems.

title: Transition to the metrics stream engine

text:
To improve monitoring and address current limitations, Redis Software is transitioning to a new observability foundation: the [metrics stream engine]().

This modern monitoring stack introduces:

- Real-time metrics, exposed directly from the engine without intermediate storage for high-fidelity, low-latency insights.

- Scalable architecture designed for cloud-native observability with lightweight Prometheus collectors.

- Deeper visibility by exposing new types of metrics such as key size distribution, server overall latency histograms, and system internals with per-endpoint resolution.

We recommend migrating to the metrics stream engine for enhanced accuracy, scalability, and future-proof observability.

If you are already using the existing scraping endpoint for integration, follow [this guide]() to transition and try the new engine. It is possible to scrape both existing and new endpoints simultaneously, allowing advanced dashboard preparation and a smooth transition.

title: Transition cluster manager alerts

text: As part of Redis Software's transition to the [new metrics stream engine](), some internal cluster manager alerts were deprecated in favor of external monitoring solutions. See the [alerts transition plan]() for guidance.

title: Cluster manager metrics

text:
You can see the metrics of the cluster in:

- **Cluster > Metrics**
- **Node > Metrics** for each node
- **Database > Metrics** for each database, including the shards for that database

The scale selector at the top of the page allows you to set the X-axis (time) scale of the graph.

To choose which metrics to display in the two large graphs at the top of the page:

1. Hover over the graph you want to show in a large graph.
1. Click on the right or left arrow to choose which side to show the graph.

We recommend that you show two similar metrics in the top graphs so you can compare them side-by-side.

See the following topics for metrics definitions:
- [Database operations]() for database metrics
- [Resource usage]() for resource and database usage metrics
- [Auto Tiering]() for additional metrics for [Auto Tiering ]() databases

title: Cluster alerts

text:
In **Cluster > Alert Settings**, you can enable alerts for node or cluster events, such as high memory usage or throughput.

Configured alerts are shown:

- As a notification on the status icon (  ) for the node and cluster
- In the **log**
- In email notifications, if you configure [email alerts](#send-alerts-by-email)

If you enable alerts for "Node joined" or "Node removed" actions,
you must also enable "Receive email alerts" so that the notifications are sent.

To enable alerts for a cluster:

1. In **Cluster > Alert Settings**, click **Edit**.
1. Select the alerts that you want to show for the cluster and click **Save**.

title: Database alerts

text:
For each database, you can enable alerts for database events, such as high memory usage or throughput.

Configured alerts are shown:

- As a notification on the status icon (  ) for the database
- In the **log**
- In emails, if you configure [email alerts](#send-alerts-by-email)

To enable alerts for a database:

1. In **Configuration** for the database, click **Edit**.
1. Select the **Alerts** section to open it.
1. Select the alerts that you want to show for the database and click **Save**.

title: Send alerts by email

text:
To send cluster and database alerts by email:

1. In **Cluster > Alert Settings**, click **Edit**.
1. Select **Set an email** to configure the [email server settings]().
1. In **Configuration** for the database, click **Edit**.
1. Select the **Alerts** section to open it.
1. Select **Receive email alerts** and click **Save**.
1. In **Access Control**, select the [database and cluster alerts]() that you want each user to receive.


title: Configure cluster DNS

summary: Configure DNS to communicate between nodes in your cluster.

title: Overview

text:
By default, Redis Software deployments use DNS to communicate between nodes.  You can also use the [Discovery Service](), which uses IP addresses to connect and complies with the [Redis Sentinel API]() supported by Redis Open Source.

Each node in a Redis Software cluster includes a small DNS server to manage internal functions, such as high availability, automatic failover, automatic migration, and so on.
Nodes should only run the DNS server included with the software.  Running additional DNS servers can lead to unexpected behavior.

title: Cluster name and connection management

text:
Whether you're administering Redis Software or accessing databases, there are two ways to connect:

- URL-based connections - URL-based connections use DNS to resolve the fully qualified cluster domain name (FQDN).  This means that DNS records might need to be updated when topology changes, such as adding (or removing) nodes from the cluster.

    Because apps and other client connections rely on the URL (rather than the address), they do not need to be modified when topology changes.

- IP-based connections - IP-based connections do not require DNS setup, as they rely on the underlying TCP/IP addresses.  As long as topology changes do not change the address of the cluster nodes, no configuration changes are needed, DNS or otherwise.

    However, changes to IP addresses (or changes to IP address access) impact all connections to the node, including apps and clients.  IP address changes can therefore be unpredictable or time-consuming.

title: URL-based connections

text:
The fully qualified domain name (FQDN) is the unique cluster identifier that enables clients to connect to the different components of Redis Software.
The FQDN is a crucial component of the high-availability mechanism because it's used internally to enable and implement automatic and transparent failover of nodes, databases, shards, and endpoints.

Setting the cluster's FQDN is a one-time operation, one that cannot be changed after being set.

The FQDN must always comply with the IETF's [RFC 952](https://datatracker.ietf.org/doc/html/rfc952) standard
and section 2.1 of the [RFC 1123](https://datatracker.ietf.org/doc/html/rfc1123) standard.

title: Identify the cluster

text: To identify the cluster, either use DNS to define a fully qualified domain name or use the IP addresses of each node.

title: Define domain using DNS

text:
Use DNS if you:

- have your own domain
- want to integrate the cluster into that domain
- can access and update the DNS records for that domain

1. Make sure that the cluster and at least one node (preferably all nodes) in the cluster
    are correctly configured in the DNS with the appropriate NS entries.

    For example:

    - Your domain is: `mydomain.com`
    - You would like to name the Redis Software cluster `mycluster`
    - You have three nodes in the cluster:
        - node1 (IP address 1.1.1.1)
        - node2 (2.2.2.2)
        - node3 (3.3.3.3)

1. In the FQDN field, enter the value `mycluster.mydomain.com`
    and add the following records in the DNS table for `mydomain.com`:

    [code example]

title: Zero-configuration using mDNS {#zeroconfiguration-using-mdns-development-option-only}

text:
Development and test environments can use [Multicast DNS](https://en.wikipedia.org/wiki/Multicast_DNS) (mDNS), a zero-configuration service designed for small networks.  Production environments should _not_ use mDNS.

mDNS is a standard protocol that provides DNS-like name resolution and service discovery capabilities
to machines on local networks with minimal to no configuration.

Before adopting mDNS, verify that it's supported by each client you wish to use to connect to your Redis databases.  Also make sure that your network infrastructure permits mDNS/multi-casting between clients and cluster nodes.

Configuring the cluster to support mDNS requires you to assign the cluster a `.local` name.

For example, if you want to name the Redis Software cluster `rediscluster`, specify the FQDN name as `rediscluster.local`.

When using the DNS or mDNS option, failover can be done transparently and the DNS is updated automatically to point to the IP address of the new primary node.

title: IP-based connections

text:
When you use the IP-based connection option, the FQDN does not need to have any special format
because clients use IP addresses instead of hostnames to access the databases so you are free to choose whatever name you want.
Using the IP-based connection option does not require any DNS configuration either.

To administer the cluster you do need to know the IP address of at least one of the nodes in the cluster.
Once you have the IP address, you can simply connect to port number 8443 (for example: <https://10.0.0.12:8443>).
However, as the topology of the cluster changes and node with the given IP address is removed,
you need to remember the IP address of another node participating in this cluster to connect to the Cluster Manager UI and manage the cluster.

Applications connecting to Redis Software databases have the same constraints.
When using the IP-based connection method, you can use the [Discovery Service]()
to discover the database endpoint for a given database name as long as you have an IP address for at least one of the nodes in the cluster.
The API used for discovery service is compliant with the Redis Sentinel API.

To test your connection, try pinging the service.  For help, see [Connect to your database]().

code:
mycluster.mydomain.com        NS  node1.mycluster.mydomain.com
                                      node2.mycluster.mydomain.com
                                      node3.mycluster.mydomain.com

    node1.mycluster.mydomain.com  A   1.1.1.1

    node2.mycluster.mydomain.com  A   2.2.2.2

    node3.mycluster.mydomain.com  A   3.3.3.3

section_id: define-domain-using-dns


title: Set up a Redis Software cluster behind a load balancer

summary: Set up a Redis Software cluster using a load balancer instead of DNS to direct traffic to cluster nodes.

title: Overview

text: To set up a Redis Software cluster in an environment that doesn't allow DNS, you can use a load balancer (LB) to direct traffic to the cluster nodes.

title: DNS role for databases

text:
Normally, Redis Software uses DNS to provide dynamic database endpoints.
A DNS name such as `redis-12345.clustername.domain` gives clients access to the database resource:

- If multiple proxies are in use, the DNS name resolves to multiple IP addresses so clients can load balance.
- On failover or topology changes, the DNS name is automatically updated to reflect the live IP addresses.

When DNS cannot be used, clients can still connect to the endpoints with the IP addresses,
but the benefits of load balancing and automatic updates to IP addresses won't be available.

title: Network architecture with load balancer

text:
You can compensate for the lack of DNS resolution with load balancers that can expose services and provide service discovery.
A load balancer is configured in front of the Redis Software cluster, exposing several logical services:

- Control plane services, such as the Cluster Manager UI
- Data plane services, such as database endpoints for client application connections

Depending on which Redis Software services you want to access outside the cluster, you may need to configure the load balancers separately.
One or more virtual IPs (VIPs) are defined on the load balancer to expose Redis Software services.
The architecture is shown in the following diagram with a 3-node Redis Software cluster with one database (DB1) configured on port 12000:

title: Set up a cluster with load balancers

title: Prerequisites

text:
- [Install]() the latest version of Redis Software on your clusters
- Configure the cluster with the cluster name (FQDN) even though DNS is not in use.
    Remember that the same cluster name is used to issue the license keys.
    We recommend that you use a ".local" suffix in the FQDN.

title: Configure load balancers

role: configuration

text:
- Make sure that the load balancer is performing TCP health checks on the cluster nodes.
- Expose the services that you require through a virtual IP, for example:
    - Cluster Manager UI on port 8443
    - Rest API on port 9443 for secure HTTPS connections and port 8080 for HTTP
    - Database ports 10000-19999

Other ports are shown in the list of [Redis Software network ports]().

Sticky, secured connections are needed only for the Redis Software Cluster Manager UI on port 8443.

- Certain load balancers provide specific logic to close idle connections. Either turn off this feature or make sure the applications connecting to Redis use reconnection logic.
- Make sure the load balancer is fast enough to resolve connections between two clusters or applications that are connected to Redis databases through a load balancer.
- Choose the standard load balancer that is commonly used in your environment so that you have easy access to in-house expertise for troubleshooting issues.

title: Configure cluster

text:
For clusters behind load balancers, we recommend using the `all-nodes` [proxy policy]() and enabling `handle_redirects`.

To allow inbound connections to be terminated on the relevant node inside the cluster, run the following `rladmin` commands on the cluster:

[code example]

Optionally configure sparse shard placement to allow closer termination of client connections to where the Redis shard is located:

[code example]

title: Configure database

text:
After you update the cluster settings and configure the load balancers, you can go to the Redis Software Cluster Manager UI at `https://load-balancer-virtual-ip:8443/` and [create a new database]().

To create an Active-Active database, use the `crdb-cli` utility. See the [`crdb-cli` reference]() for more information about creating Active-Active databases from the command line.

title: Update load balancer configuration when cluster configuration changes

text:
When your Redis Software cluster is behind a load balancer, you must update the load balancer when the cluster topology and IP addresses change.
Some common cases that require you to update the load balancer are:

- Adding new nodes to the Redis Software cluster
- Removing nodes from the Redis Software cluster
- Maintenance for Redis Software cluster nodes
- IP address changes for Redis Software cluster nodes

After these changes, make sure that the Redis connections in your applications can connect to the Redis database,
especially if they are directly connected on IP addresses that have changed.

title: Intercluster communication considerations

text:
Redis Software supports several topologies that allow intercluster replication, such as [Replica Of]() and [Active-Active]() deployment options.
When your Redis Software clusters are behind load balancers, you must allow some network services to be open and defined in the load balancers to allow the replication to work.

title: Replica Of

text: For Replica Of communication to work, you must expose database ports locally in each cluster and allow these ports through any firewalls between the clusters.

title: Active-Active

text: For Active-Active communication to work, you must expose several ports, including every database port and several control plane ports as defined in [Network port configurations](). Pay attention to services that include "Active-Active" in the connection source column, and allow these ports through any firewalls between the clusters.

code:
# Enable all-nodes proxy policy by default
rladmin tune cluster default_sharded_proxy_policy all-nodes default_non_sharded_proxy_policy all-nodes

# Redirect where necessary when behind a load balancer
rladmin cluster config handle_redirects enabled

section_id: configure-cluster

code:
# Enable sparse placement by default
rladmin tune cluster default_shards_placement sparse


title: AWS Route53 DNS management

summary: How to configure AWS Route 53 DNS

title: Overview

text: Redis Software uses DNS to achieve high availability and fail-over regardless of where it is installed.

title: What is AWS Route 53?

text: Route 53 is a scalable DNS service by Amazon Web Service (AWS). It routes user traffic to AWS resources and external sites, offering DNS health checks, traffic management, and failover capabilities. It's integral for high-availability architectures and also provides domain registration services.

title: Create a hosted zone

text:
Creating a hosted zone in Amazon Route 53 is a foundational step in managing your domain's DNS settings.

A hosted zone functions as a container for the DNS records of a specific domain. To create one, you first need to:

1. Log into the AWS Management Console
2. Navigate to the Route 53 dashboard
3. Select "Create Hosted Zone"
4. Enter your domain name, and choose public hosted zone

The hosted zone provides you with a set of Name Server (NS) records, which you will need to update at your domain registrar. This process effectively delegates the DNS management of your domain to Route 53, allowing you to create, update, and manage DNS records for your domain within the AWS ecosystem.

Once created, it will appear in the list of **Hosted zones**

title: Create glue records

text:
A **glue record** is a type of DNS record that helps prevent circular dependencies by providing the IP addresses of your nameservers. To create glue records in Route 53, you first need to set up a hosted zone for your domain. You will create a separate A record for each node in your Redis Software cluster. The **Record name** will be a subdomain definition of the NS record you will define and the **value** should be set to the IP address of the node in your cluster.

Once complete, it should look something like this

title: Create nameserver record

text:
When you create a new hosted zone in Route 53 for your domain, a set of NS records is automatically generated. These records list the nameservers assigned by Route 53 to your domain.

You will need to create a new NS record which will point to the glue records created in the previous step.

It is important to make sure that the **Record Name** of the NS record equals the FQDN (Fully Qualified Domain Name) of your Redis Software cluster. If not, DNS resolution will not function correctly.

title: Validate

text:
Once all steps are completed, the configuration should look similar to this

You can test and validate your settings by using the [code example]sh
dig ns test.demo-rlec.redislabs.com

; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> ns test.demo-rlec.redislabs.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25061
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;test.demo-rlec.redislabs.com. IN NS

;; ANSWER SECTION:
test.demo-rlec.redislabs.com. 3409 IN NS node2.test.demo-rlec.redislabs.com.
test.demo-rlec.redislabs.com. 3409 IN NS node1.test.demo-rlec.redislabs.com.
test.demo-rlec.redislabs.com. 3409 IN NS node3.test.demo-rlec.redislabs.com.

;; Query time: 31 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Feb 14 16:49:13 CET 2017
;; MSG SIZE  rcvd: 120
```

You can see that the name are given a prefix of `ns-`. This answer does not come
from *Route53* but from the cluster nameservers themselves.


title: Manage networks

summary: Networking features and considerations for designing your Redis Software deployment.

summary: How to configure AWS Route 53 DNS

title: AWS Route53 DNS management

title: Configure cluster DNS

summary: Information and requirements for using multiple IP addresses or IPv6 addresses with Redis Software.

title: Manage IP addresses

summary: Requirements for using the mDNS protocol in development and testing environments.

title: Client prerequisites for mDNS

summary: This document describes the various network port ranges and their uses.

title: Network port configurations

summary: Describes how to enable public and private endpoints for databases on a cluster.

title: Enable private and public database endpoints


title: Client prerequisites for mDNS

title: Content

text:
mDNS is only supported for development and testing environments.

If you choose to use the mDNS protocol when [you set the cluster name](),
make sure that the configurations and prerequisites for resolving database endpoints are met on the client machines.
If you have [Replica Of]() databases on the cluster,
the configurations and prerequisites are also required for the Redis Software nodes.

To prepare a client or node for mDNS:

1. Make sure that the clients and cluster nodes are on the same physical network
    or have the network infrastructure configured to allow multicasting between them.
1. Install these prerequisite packages:

    - For Ubuntu:

        [code example]

    - For RHEL/CentOS 6.x:

        [code example]

    - For RHEL/CentOS 7:

        [code example]

1. If you are using [mDNS with IPv6 addresses](),
    update the hosts line in `/etc/nsswitch.conf` to:

    [code example]

code: apt-get install libnss-mdns

code:
$ rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
        $ yum install nss-mdns
        $ service avahi-daemon start

code:
$ rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm
        $ yum install nss-mdns
        $ service avahi-daemon start

code:
hosts: files mdns4_minimal
    \[NOTFOUND=return\] mdns


title: Manage IP addresses

title: Overview

text:
Redis Software supports servers, instances, and VMs with
multiple IPv4 or IPv6 addresses.

title: Traffic overview

text:
Redis Software traffic is divided into internal traffic and external traffic:

- "Internal traffic" refers to internal cluster communications, such as communications between the nodes for cluster management.

- "External traffic" refers to communications between clients and databases and connections to the Cluster Manager UI.

When only one IP address exists on a machine that serves as a Redis Software node, it is used for both internal and external traffic.

title: Multiple IP addresses

text:
During node configuration on a machine with multiple IP addresses, you must assign one address for internal traffic and one or more other addresses for external traffic.

If the cluster uses IPv4 for internal traffic, all communication between cluster nodes uses IPv4 addresses. If the cluster uses IPv6 for internal traffic, all communication between cluster nodes uses IPv6 addresses.

To update IP address configuration after cluster setup, see [Change internal IP address](#change-internal-ip-address) or [Configure external IP addresses](#configure-external-ip-addresses).

title: Enable IPv6 for internal traffic

text:
IPv6 for internal communication is supported only for new clusters with Redis Software version 7.4.2 or later.

If the server has only IPv6 interfaces, IPv6 is automatically used for internal and external traffic. Otherwise, internal traffic uses IPv4 by default.

To use IPv6 for internal traffic on a machine with both IPv4 and IPv6 interfaces, set `use_internal_ipv6` to `true` when you create a cluster using the [bootstrap REST API request]():

[code example]

When other IPv6 nodes join a cluster that has `use_internal_ipv6` enabled, they automatically use IPv6 for internal traffic. Do not manually set `use_internal_ipv6` when joining a node to an existing IPv6 cluster, or a `NodeBootstrapError` can occur if the values do not match.

If you try to add a node without an IPv6 interface to a cluster that has `use_internal_ipv6` enabled, a `NodeBootstrapError` occurs.

The host file `/etc/hosts` on each node in the cluster must include the following entry:

[code example]

title: Change internal IP address

text:
Before you change an internal IP address, consider the following:

- Verify the address is valid and bound to an active interface on the node. Failure to do so prevents the node from coming back online and rejoining the cluster.

- Joining a node that only has IPv4 network interfaces to a master node with IPv6 enabled causes a `NodeBootstrapError`.

- Joining a node that only has IPv6 network interfaces to a master node that does not have IPv6 enabled causes a `NodeBootstrapError`.

- You cannot change the internal address from IPv4 to IPv6 or IPv6 to IPv4 in a running cluster. You can only change the internal address within the same protocol as the cluster.

If you need to update the internal IP address in the OS, one option is to remove that node from the cluster, change the IP address, and then add the node back into the cluster.

Alternatively, you can use the following steps to update a node's internal IP address without removing it from the cluster:

1. Turn the node into a replica using [`rladmin`]():

    [code example]

1. Deactivate the `rlec_supervisor` service on the node:

    [code example]

1. Restart the node.

1. Follow the operating system vendor's instructions to change the node's IP address.

1. From a different cluster node, use [`rladmin node addr set`]() to update the first node's IP address:

    [code example]

1. Enable the `rlec_supervisor` service on the node:

    [code example]

1. Restart `rlec_supervisor` or restart the node.

    [code example]

1. Verify the node rejoined the cluster:

    [code example]

Repeat this procedure for other cluster nodes to change their internal IP addresses.

title: Configure external IP addresses

text:
You can configure external addresses that are not bound to an active interface, but are otherwise mapped or configured to route traffic to the node (such as AWS Elastic IPs or a load balancer VIP).

You can use [rladmin node external_addr]() to change a node's external IP addresses.

Add an external IP address:

[code example]

Set one or more external IP addresses:

[code example]

Remove an external IP address:

[code example]

While [joining a new node to a
cluster]()
during the node bootstrap process,
when prompted to provide an IP of an existing node in the cluster,
if you use the node's IP, provide the node's internal IP address.

title: Known limitations

text:
- Using IPv6 for internal traffic is supported only for new clusters running Redis Software version 7.4.2 or later.

- Changing an existing cluster's internal traffic from IPv4 to IPv6 is not supported.

- All nodes must use the same protocol for internal traffic.

- If a Redis Software node's host machine has both IPv4 and IPv6 addresses, internal communication within the node initially uses IPv4 until the bootstrap process finishes.

code:
POST /v1/bootstrap/create_cluster
{
    "action": "create_cluster",
    "cluster": {
        "name": "cluster.fqdn"
    },
    "credentials": {
       "username": "admin_username",
       "password": "admin_password"
    },
    "node": {
       "identity": {
          "addr": "2001:DB8::/32",
          "external_addr": ["2001:0db8:85a3:0000:0000:8a2e:0370:7334"],
          "use_internal_ipv6": true
       },
    },
    ...
}

code: ::1 localhost

code: rladmin node <ID> enslave demote_node

section_id: change-internal-ip-address

code: systemctl disable rlec_supervisor

code: rladmin node <ID> addr set <IP address>

code: systemctl enable rlec_supervisor

code: systemctl start rlec_supervisor

code: rladmin status nodes

code: rladmin node <ID> external_addr add <IP address>

section_id: configure-external-ip-addresses

code: rladmin node <ID> external_addr set <IP address 1> <IP address N>

code: rladmin node <ID> external_addr remove <IP address>


title: Network port configurations

title: Overview

text:
All Redis Software deployments span multiple physical/virtual nodes. You'll need to keep several ports open between these nodes. This document describes the various port ranges and their uses.

Whenever you create a new database, you must verify that the ports assigned to the new database's endpoints are open. The cluster will not perform this verification for you.

title: Ports and port ranges used by Redis Software

text:
Redis Software's port usage falls into three general categories:

- Internal: For traffic between or within cluster nodes
- External: For traffic from client applications or external monitoring resources
- Active-Active: For traffic to and from clusters hosting Active-Active databases

| Protocol | Port | Configurable | Connection source | Description |
|----------|------|--------------|-------------------|-------------|
| TCP | 8001 | ❌ No | Internal, External | Traffic from application to Redis Software [Discovery Service]() |
| TCP | 8070 | ❌ No | External | Metrics exported and managed by the web proxy |
| TCP | 3347-3349, 8000, 8071, 9091, 9125 | ❌ No | Internal | Internal metrics ports |
| TCP | 8443 | ✅ Yes | Internal, External | Secure (HTTPS) access to the management web UI |
| TCP | 9081 | ✅ Yes | Internal | CRDB coordinator for Active-Active management (internal) |
| TCP | 9082 | ❌ No | Internal | Cluster API internal port |
| TCP | 9443, 8080, 3346 | ✅ Yes | Internal, External, Active-Active | REST API traffic, including cluster management and node bootstrap |
| TCP | 10050 | ❌ No | Internal | Zabbix monitoring |
| TCP | 10000-10049, 10051-19999 | ✅ Yes | Internal, External, Active-Active | Database traffic |
| UDP | 53, 5353 | ❌ No | Internal, External | DNS/mDNS traffic |
| TCP | 1968 | ❌ No | Internal | Proxy traffic |
| TCP | 3333-3345, 3350-3354, 36379 | ❌ No | Internal | Internode communication |
| TCP | 3355 | ✅ Yes | Internal | Authentication service internal port |
| TCP | 20000-29999 | ❌ No | Internal | Database shard traffic |
| TCP | 8002, 8004, 8006 | ✅ Yes | Internal | Default system health monitoring (envoy admin, envoy management server, gossip envoy admin)|
| TCP | 8444, 9080 | ❌ No | Internal | Traffic between web proxy and cnm_http/cm |

title: Change port configuration

title: Reserve ports

text:
Redis Software reserves some ports by default (`system_reserved_ports`). To reserve other ports or port ranges and prevent the cluster from assigning them to database endpoints, configure `reserved_ports` using one of the following methods:

- [rladmin cluster config]()

    [code example]

    For example:

    [code example]

- [Update cluster settings]() REST API request

    [code example]

    For example:

    [code example]

title: Change the Cluster Manager UI port

text:
The Redis Software Cluster Manager UI uses port 8443, by default. You can change this to a custom port as long as the new port is not in use by another process.

To change this port, run:

[code example]

After you change the Cluster Manager UI port, use the new port in the URL when accessing the UI on any node in the cluster. Example: `https://newnode.mycluster.example.com:<custom-port>`

title: Change the envoy  ports

text:
For system health monitoring, Redis uses the following ports by default:

- Port 8002 for envoy admin

- Port 8004 for envoy management server

- Port 8006 for gossip envoy admin

You can change each envoy port to a custom port using the [`rladmin cluster config`]() command as long as the new port is not in use by another process. When you change `envoy_admin_port`, expect a restart of envoy.

To change the envoy admin port, run:

[code example]

To change the envoy management server port, run:

[code example]

To change the gossip envoy admin port, run:

[code example]

title: Change the REST API port

text:
For the REST API, Redis Software uses port 9443 (secure) and port 8080 (not secure), by default. You can change this to a custom port as long as the new port is not in use by another process.

To change these ports, run:

[code example]

[code example]

title: OS conflicts with port 53

title: Update `sysctl.conf` to avoid port collisions

title: Configure HTTPS

title: Require HTTPS for API endpoints

text:
By default, the Redis Software API supports communication over HTTP and HTTPS. However, you can turn off HTTP support to ensure that API requests are encrypted.

Before you turn off HTTP support, make sure you migrate any scripts or proxy configurations that use HTTP to the encrypted API endpoint to prevent broken connections.

To turn off HTTP support for API endpoints, run:

[code example]

After you turn off HTTP support, traffic sent to the unencrypted API endpoint is blocked.

title: HTTP to HTTPS redirection

text:
Starting with version 6.0.12, you cannot use automatic HTTP to HTTPS redirection.
To poll metrics from the `metrics_exporter` or to access the Cluster Manager UI, use HTTPS in your request. HTTP requests won't be automatically redirected to HTTPS for those services.

title: Nodes on different VLANs

text:
Nodes in the same cluster must reside on the same VLAN. If you can't
host the nodes on the same VLAN, then you must open [all ports]() between them.

code: rladmin cluster config reserved_ports <list of ports/port ranges>

section_id: reserve-ports

code: rladmin cluster config reserved_ports 11000 13000-13010

code:
PUT /v1/cluster
    { "reserved_ports": ["list of ports/port ranges"] }

code: rladmin cluster config cm_port <custom-port>

section_id: change-the-cluster-manager-ui-port

code:
$ rladmin cluster config envoy_admin_port <new-port>
Updating envoy_admin_port... restarting now

section_id: change-the-envoy-ports

code:
$ rladmin cluster config envoy_mgmt_server_port <new-port>
Cluster configured successfully

code:
$ rladmin cluster config gossip_envoy_admin_port <new-port>
Cluster configured successfully

code: rladmin cluster config cnm_http_port <new-port>

section_id: change-the-rest-api-port

code: rladmin cluster config cnm_https_port <new-port>

code: rladmin cluster config http_support disabled

section_id: require-https-for-api-endpoints


title: Content

text:
Each node in Redis Software can be configured with [private and external IP addresses](). By default, Redis Software databases expose a single endpoint, e.g. cluster.com (FQDN), using the external IP addresses, making it available to the public network (e.g. the internet). Additionally, the cluster can be configured to expose a private FQDN, which utilizes the private IP addresses for access from the private network only (e.g. VPC or an internal network).

When you create a cluster via the UI, you can configure it to expose private and public endpoints.
This is common for environments such as cloud platforms and enterprises.

When doing so, the cluster creates an additional FQDN, e.g. internal.cluster.com for private network (e.g. VPC or an internal network), while the cluster.com FQDN can be used by a public network (e.g. the internet).

You can enable public and private endpoints during cluster creation only.
However, you can still add an additional FQDN in a different domain (cluster.io, for example) after cluster creation.

To enable private and public endpoints:

1. Verify the IP addresses are bound to the server or instance.

1. During cluster setup, turn on **Enable public endpoints support** in the **Cluster** screen's **Configuration** section.

    If this setting is not enabled when the cluster is created, databases on the cluster support only a single endpoint.

1. Select **Next** to proceed to **Node** configuration.

1. In the **Network configuration** section:

    1. Configure the machine's public IP address for external traffic.

    1. Configure the private IP address for both internal and external traffic so it can be used for private database endpoints.

After cluster creation, both sets of endpoints are available for databases in the cluster.

To view and copy public and private endpoints for a database in the cluster, see the database's **Configuration > General** section.


title: Transition cluster manager alerts to Prometheus alerts

summary: Transition from internal cluster manager alerts to external monitoring alerts using Prometheus.

title: Content

text:
As Redis Software transitions from the [deprecated monitoring system]() to the [new metrics stream engine](), some internal cluster manager alerts were deprecated in favor of external monitoring solutions.

You can use the following table to transition from the deprecated alerts and set up equivalent alerts in Prometheus with [PromQL (Prometheus Query Language)](https://prometheus.io/docs/prometheus/latest/querying/basics/):


title: Alerts

summary: Documents the alerts that are tracked with Redis Software.

title: Overview

text: Cluster alerts are triggered based on thresholds applied to these stored metrics.

title: Cluster alerts

text:
In **Cluster > Alert Settings**, you can enable alerts for node or cluster events, such as high memory usage or throughput.

Configured alerts are shown:

- As a notification on the status icon (  ) for the node and cluster
- In the **log**
- In email notifications, if you configure [email alerts](#send-alerts-by-email)

If you enable alerts for "Node joined" or "Node removed" actions,
you must also enable "Receive email alerts" so that the notifications are sent.

To enable alerts for a cluster:

1. In **Cluster > Alert Settings**, click **Edit**.
1. Select the alerts that you want to show for the cluster and click **Save**.

title: Database alerts

text:
For each database, you can enable alerts for database events, such as high memory usage or throughput.

Configured alerts are shown:

- As a notification on the status icon (  ) for the database
- In the **log**
- In emails, if you configure [email alerts](#send-alerts-by-email)

To enable alerts for a database:

1. In **Configuration** for the database, click **Edit**.
1. Select the **Alerts** section to open it.
1. Select the alerts that you want to show for the database and click **Save**.

title: Send alerts by email

text:
To send cluster and database alerts by email:

1. In **Cluster > Alert Settings**, click **Edit**.
1. Select **Set an email** to configure the [email server settings]().
1. In **Configuration** for the database, click **Edit**.
1. Select the **Alerts** section to open it.
1. Select **Receive email alerts** and click **Save**.
1. In **Access Control**, select the [database and cluster alerts]() that you want each user to receive.


title: crdb-cli crdb add-instance

summary: Adds a peer replica to an Active-Active database.

title: Overview

text:
Adds a peer replica to an existing Active-Active database in order to host the database on another cluster. This creates an additional active instance of the database on the specified cluster.

[code example]

title: Parameters

role: parameters

text:
| Parameter | Value   | Description |
|-----------|---------|-------------|
| crdb-guid | string  | The GUID of the database (required) |
| instance fqdn=\<cluster_fqdn\>,username=\<username\>,password=\<password\>,url=https://\<hostname-or-IP\>:9443,replication_endpoint=\<hostname-or-IP\>:\<port\>,replication_tls_sni=\<hostname\> | strings | The connection information for the new participating cluster (required)

**Required:**
• `fqdn` - Cluster fully qualified domain name
• `username` - Cluster username
• `password` - Cluster password

**Optional:**
• `url` - URL to access the cluster's REST API
• `replication_endpoint` - Address to access the database instance for peer replication
• `replication_tls_sni` - Cluster [Server Name Indication (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) hostname for TLS connections |
| compression | 0-6 | The level of data compression:

 0 = No compression

 6 = High compression and resource load (Default: 3) |
| wait | | Prevents `crdb-cli` from running another command before this command finishes |
| no-wait | | `crdb-cli` can run another command before this command finishes |

title: Returns

role: returns

text:
Returns the task ID of the task that is adding the new instance.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be added and return `finished`.

title: Example

role: example

text: [code example]

code:
crdb-cli crdb add-instance --crdb-guid <guid>
         --instance fqdn=<cluster_fqdn>,username=<username>,password=<password>[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]
         [--compression <0-6>]
         [--wait | --no-wait]

section_id: overview

code:
$ crdb-cli crdb add-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 \
        --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin-password
Task f809fae7-8e26-4c8f-9955-b74dbbd47949 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished

section_id: example


title: crdb-cli crdb create

summary: Creates an Active-Active database.

title: Overview

text:
Creates an Active-Active database.

[code example]

title: Prerequisites

text:
Before you create an Active-Active database, you must have:

- At least two participating clusters
- [Network connectivity]() between the participating clusters

title: Parameters

text:
| Parameter & options(s)                                                                                | Value                                           | Description                                                                                |
|---------------------------------------------------------------------------------------|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name \<CRDB_name\>                                                                  | string                                          | Name of the Active-Active database (required)                                                                                |
| memory-size \<maximum_memory\>                                                                | size in bytes, megabytes (MB), or gigabytes (GB) | Maximum database memory (required)                                                                                |
| instance fqdn=\<cluster_fqdn\>,username=\<username\>,password=\<password\>,url=https://\<hostname-or-IP\>:9443,replication_endpoint=\<hostname-or-IP\>:\<port\>,replication_tls_sni=\<hostname\>         | strings                                         | The connection information for the participating clusters (required for each participating cluster)

**Required:**
• `fqdn` - Cluster fully qualified domain name
• `username` - Cluster username
• `password` - Cluster password

**Optional:**
• `url` - URL to access the cluster's REST API
• `replication_endpoint` - Address to access the database instance for peer replication
• `replication_tls_sni` - Cluster [Server Name Indication (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) hostname for TLS connections |
| port \<port_number\>                                                                 | integer                                         | TCP port for the Active-Active database on all participating clusters                                                                                |
| default-db-config \<configuration\>                                                  | string                                          | Default database configuration options                                                                                |
| default-db-config-file \<filename\>                                                  | filepath                                        | Default database configuration options from a file                                                                                |
| wait                                                                               |                                                 | Prevents `crdb-cli` from running another command before this command finishes                                                                                |
| no-wait                                                                            |                                                 | `crdb-cli` can run another command before this command finishes                                                                                |
| compression                                                                           | 0-6                                             | The level of data compression:

 0 = No compression

 6 = High compression and resource load (Default: 3)                                                                                |
| causal-consistency                                                                    | true
 false (default: false)                        | [Causal consistency]() applies updates to all instances in the order they were received                                                     |
| password \<password\>                                                                | string                                          | Password for access to the database                                                                                |
| replication                                                                           | true
 false (*default*)                        | Activates or deactivates [database replication]() where every master shard replicates to a replica shard                                                       |
| encryption                                                                            | true
 false (*default*)                        | Activates or deactivates encryption                                                                                |
| sharding                                                                              | true (*default*)
 false                         | Activates or deactivates sharding (also known as [database clustering]()). Cannot be updated after the database is created                                   |
| shards-count \<number_of_shards\>                                                              | integer                                         | If sharding is enabled, this specifies the number of Redis shards for each database instance                                                                                |
| oss-cluster                                                                           | true
false (*default*)                               | Activates [OSS cluster API]()                                                                                |
| oss-sharding                                                                          | true
false                               | Use the OSS sharding policy instead of regex rules                                                                                |
| shard-key-regex \<regex_rule\>                                                       | string                                          | If clustering is enabled, this defines a regex rule (also known as a [hashing policy]()) that determines which keys are located in each shard (defaults to `{u'regex': u'.*\\{(?<tag>.*)\\}.*'}, {u'regex': u'(?<tag>.*)'} `) |
| bigstore                                                                              | true

 false (*default*)                        | If true, the database uses Auto Tiering to add flash memory to the database                                                                                |
| bigstore-ram-size \<size\>                                                           | size in bytes, megabytes (MB), or gigabytes (GB) | Maximum RAM limit for  databases with Auto Tiering enabled                                                                                |
| with-module name=\<module_name\>,version=\<module_version\>,args=\<module_args\> | strings                                         | Creates a database with a specific module                                                                                |
| eviction-policy                                                     | noeviction (*default*)
allkeys-lru
allkeys-lfu
allkeys-random
volatile-lru
volatile-lfu
volatile-random
volatile-ttl | Sets [eviction policy]()                                                                                |
| proxy-policy                                                                          | all-nodes
all-master-shards
single        | Sets proxy policy |

title: Returns

text:
Returns the task ID of the task that is creating the database.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be created and then return the CRDB GUID.

title: Examples

text:
[code example]

To create an Active-Active database with two shards in each instance and with encrypted traffic between the clusters:

[code example]

To create an Active-Active database with two shards and with RediSearch 2.0.6 module:

[code example]

To create an Active-Active database with two shards and with encrypted traffic between the clusters:

[code example]

To create an Active-Active database with 1 shard in each instance and not wait for the response:

[code example]

code:
crdb-cli crdb create --name <name>
         --memory-size <maximum_memory>
         --instance fqdn=<cluster1.example.com>,username=<username>,password=<password>[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]
         --instance fqdn=<cluster2.example.com>,username=<username>,password=<password>[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]
         [--port <port_number>]
         [--wait | --no-wait]
         [--default-db-config <configuration>]
         [--default-db-config-file <filename>]
         [--compression <0-6>]
         [--causal-consistency { true | false } ]
         [--password <password>]
         [--replication { true | false } ]
         [--encryption { true | false } ]
         [--sharding { false | true } ]
         [--shards-count <number_of_shards>]
         [--shard-key-regex <regex_rule>]
         [--oss-cluster { true | false } ]
         [--oss-sharding { true | false } ]
         [--bigstore { true | false }]
         [--bigstore-ram-size <maximum_memory>]
         [--eviction-policy { noeviction | allkeys-lru | allkeys-lfu | allkeys-random | volatile-lru | volatile-lfu | volatile-random | volatile-ttl }]
         [--proxy-policy { all-nodes | all-master-shards | single }]
         [--with-module name=<module_name>,version=<module_version>,args=<module_args>]

code:
$ crdb-cli crdb create --name database1 --memory-size 1GB --port 12000 \
           --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin \
           --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin
Task 633aaea3-97ee-4bcb-af39-a9cb25d7d4da created
  ---> Status changed: queued -> started
  ---> CRDB GUID Assigned: crdb:d84f6fe4-5bb7-49d2-a188-8900e09c6f66
  ---> Status changed: started -> finished

section_id: examples

code: crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --encryption true

code: crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --shards-count 2 --with-module name=search,version="2.0.6",args="PARTITIONS AUTO"

code: crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --encryption true --shards-count 2

code: crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=admin@redis.local,password=admin --instance fqdn=cluster2.redis.local,username=admin@redis.local,password=admin --no-wait


title: crdb-cli crdb delete

summary: Deletes an Active-Active database.

title: Overview

text:
Deletes an Active-Active database.

[code example]

This command is irreversible. If the data in your database is important, back it up before you delete the database.

title: Parameters

text:
| Parameter           | Value  | Description                         |
|---------------------|--------|-------------------------------------|
| crdb-guid | string | The GUID of the database (required) |
| no-wait             |        | Does not wait for the task to complete |

title: Returns

text:
Returns the task ID of the task that is deleting the database.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be deleted and return `finished`.

title: Example

text: [code example]

code:
crdb-cli crdb delete --crdb-guid <guid>
         [ --no-wait ]

code:
$ crdb-cli crdb delete --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35
Task dfe6cacc-88ff-4667-812e-938fd05fe359 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished


title: crdb-cli crdb flush

title: Overview

text:
Clears all keys from an Active-Active database.

[code example]

This command is irreversible. If the data in your database is important, back it up before you flush the database.

title: Parameters

text:
| Parameter           | Value  | Description                         |
|---------------------|--------|-------------------------------------|
| crdb-guid  | string | The GUID of the database (required) |
| no-wait             |        | Does not wait for the task to complete |

title: Returns

text:
Returns the task ID of the task clearing the database.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be cleared and return `finished`.

title: Example

text: [code example]

code:
crdb-cli crdb flush --crdb-guid <guid>
         [ --no-wait ]

code:
$ crdb-cli crdb flush --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66
Task 53cdc59e-ecf5-4564-a8dd-448d71f9e568 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished


title: crdb-cli crdb get

title: Overview

text:
Shows the current configuration of an Active-Active database.

[code example]

title: Parameters

text:
| Parameter           | Value  | Description                         |
|---------------------|--------|-------------------------------------|
| crdb-guid  | string | The GUID of the database (required) |

title: Returns

text: Returns the current configuration of the database.

title: Example

text: [code example]

code: crdb-cli crdb get --crdb-guid <guid>

code:
$ crdb-cli crdb get --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66
CRDB-GUID: d84f6fe4-5bb7-49d2-a188-8900e09c6f66
Name: database1
Encryption: False
Causal consistency: False
Protocol version: 1
FeatureSet version: 5
Modules: []
Default-DB-Config:
  memory_size: 1073741824
  port: 12000
  replication: True
  shard_key_regex: [{'regex': '.*\\{(?<tag>.*)\\}.*'}, {'regex': '(?<tag>.*)'}]
  sharding: True
  shards_count: 1
  tls_mode: disabled
  rack_aware: None
  data_persistence: None
  authentication_redis_pass: None
  authentication_admin_pass: None
  oss_sharding: None
  oss_cluster: None
  proxy_policy: None
  shards_placement: None
  oss_cluster_api_preferred_ip_type: None
  bigstore: None
  bigstore_ram_size: None
  aof_policy: None
  snapshot_policy: None
  max_aof_load_time: None
  max_aof_file_size: None
Instance:
  Id: 1
  Cluster:
    FQDN: cluster1.redis.local
    URL: https://cluster1.redis.local:9443
    Replication-Endpoint: <Default>
    Replication TLS SNI: <Default>
  Compression: 3
  DB-Config:
    authentication_admin_pass:
    replication: None
    rack_aware: None
    memory_size: None
    data_persistence: None
    tls_mode: None
    authentication_redis_pass: None
    port: None
    shards_count: None
    shard_key_regex: None
    oss_sharding: None
    oss_cluster: None
    proxy_policy: None
    shards_placement: None
    oss_cluster_api_preferred_ip_type: None
    bigstore: None
    bigstore_ram_size: None
    aof_policy: None
    snapshot_policy: None
    max_aof_load_time: None
    max_aof_file_size: None
Instance:
  Id: 2
  Cluster:
    FQDN: cluster2.redis.local
    URL: https://cluster2.redis.local:9443
    Replication-Endpoint: <Default>
    Replication TLS SNI: <Default>
  Compression: 3
  DB-Config:
    authentication_admin_pass:
    replication: None
    rack_aware: None
    memory_size: None
    data_persistence: None
    tls_mode: None
    authentication_redis_pass: None
    port: None
    shards_count: None
    shard_key_regex: None
    oss_sharding: None
    oss_cluster: None
    proxy_policy: None
    shards_placement: None
    oss_cluster_api_preferred_ip_type: None
    bigstore: None
    bigstore_ram_size: None
    aof_policy: None
    snapshot_policy: None
    max_aof_load_time: None
    max_aof_file_size: None


title: crdb-cli crdb health-report

summary: Shows the health report of an Active-Active database.

title: Overview

text:
Shows the health report of the API management layer of an Active-Active database.

[code example]

title: Parameters

title: Returns

text: Returns the health report of the API management layer of the database.

title: Example

text: [code example]

code: crdb-cli crdb health-report --crdb-guid <guid>

code:
$ crdb-cli crdb health-report --crdb-guid d84f6fe4-5bb7-49d2-a188-8900e09c6f66
[
  {
    "active_config_version":1,
    "cluster_name":"cluster2.redis.local",
    "configurations":[
      {
        "causal_consistency":false,
        "encryption":false,
        "featureset_version":5,
        "instances":[
          {
            "cluster":{
              "name":"cluster1.redis.local",
              "url":"https:\/\/cluster1.redis.local:9443"
            },
            "db_uid":"",
            "id":1
          },
          {
            "cluster":{
              "name":"cluster2.redis.local",
              "url":"https:\/\/cluster2.redis.local:9443"
            },
            "db_uid":"1",
            "id":2
          }
        ],
        "name":"database1",
        "protocol_version":1,
        "status":"commit-completed",
        "version":1
      }
    ],
    "connections":[
      {
        "name":"cluster1.redis.local",
        "status":"ok"
      },
      {
        "name":"cluster2.redis.local",
        "status":"ok"
      }
    ],
    "guid":"d84f6fe4-5bb7-49d2-a188-8900e09c6f66",
    "name":"database1",
    "connection_error":null
  },
  {
    "active_config_version":1,
    "cluster_name":"cluster1.redis.local",
    "configurations":[
      {
        "causal_consistency":false,
        "encryption":false,
        "featureset_version":5,
        "instances":[
          {
            "cluster":{
              "name":"cluster1.redis.local",
              "url":"https:\/\/cluster1.redis.local:9443"
            },
            "db_uid":"4",
            "id":1
          },
          {
            "cluster":{
              "name":"cluster2.redis.local",
              "url":"https:\/\/cluster2.redis.local:9443"
            },
            "db_uid":"",
            "id":2
          }
        ],
        "name":"database1",
        "protocol_version":1,
        "status":"commit-completed",
        "version":1
      }
    ],
    "connections":[
      {
        "name":"cluster1.redis.local",
        "status":"ok"
      },
      {
        "name":"cluster2.redis.local",
        "status":"ok"
      }
    ],
    "guid":"d84f6fe4-5bb7-49d2-a188-8900e09c6f66",
    "name":"database1",
    "connection_error":null
  }
]


title: crdb-cli crdb commands

summary: Manage Active-Active databases.

title: crdb-cli crdb add-instance

summary: Creates an Active-Active database.

title: crdb-cli crdb create

summary: Deletes an Active-Active database.

title: crdb-cli crdb delete

summary: Clears all keys from an Active-Active database.

title: crdb-cli crdb flush

summary: Shows the current configuration of an Active-Active database.

title: crdb-cli crdb get

title: crdb-cli crdb health-report

summary: Shows a list of all Active-Active databases.

title: crdb-cli crdb list

summary: Deletes data from a local instance and removes it from the Active-Active database.

title: crdb-cli crdb purge-instance

summary: Removes a peer replica from an Active-Active database.

title: crdb-cli crdb remove-instance

summary: Updates the configuration of an Active-Active database.

title: crdb-cli crdb update

title: Overview

text: Use `crdb-cli crdb` commands to manage Active-Active databases.

title: `crdb-cli crdb` commands


title: crdb-cli crdb list

title: Overview

text:
Shows a list of all Active-Active databases.

[code example]

title: Parameters

title: Returns

text: Returns a list of all Active-Active databases that the cluster participates in. Each database is represented with a unique GUID, the name of the database, an instance ID, and the FQDN of the cluster that hosts the instance.

title: Example

text: [code example]

code: crdb-cli crdb list

code:
$ crdb-cli crdb list
CRDB-GUID                             NAME       REPL-ID  CLUSTER-FQDN
d84f6fe4-5bb7-49d2-a188-8900e09c6f66  database1  1        cluster1.redis.local
d84f6fe4-5bb7-49d2-a188-8900e09c6f66  database1  2        cluster2.redis.local


title: crdb-cli crdb purge-instance

title: Overview

text:
Deletes data from a local instance and removes the instance from the Active-Active database.

[code example]

Once this command finishes, the other replicas must remove this instance with [`crdb-cli crdb remove-instance --force`]().

title: Parameters

text:
| Parameter                 | Value  | Description                                      |
|---------------------------|--------|--------------------------------------------------|
| crdb-guid        | string | The GUID of the database (required)              |
| instance-id  | string | The ID of the local instance (required) |
| no-wait                   |        | Does not wait for the task to complete           |

title: Returns

text:
Returns the task ID of the task that is purging the local instance.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be purged and return `finished`.

title: Example

text: [code example]

code:
crdb-cli crdb purge-instance --crdb-guid <guid>
         --instance-id <instance-id>
         [ --no-wait ]

code:
$ crdb-cli crdb purge-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id 2
Task add0705c-87f1-4c28-ad6a-ab5d98e00c58 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished


title: crdb-cli crdb remove-instance

title: Overview

text:
Removes a peer replica instance from the Active-Active database and deletes the instance and its data from the participating cluster.

[code example]

If the cluster cannot communicate with the instance that you want to remove, you can:

1. Use the `--force` option to remove the instance from the Active-Active database without purging the data from the instance.

1. Run [`crdb-cli crdb purge-instance`]() from the removed instance to delete the Active-Active database and its data.

title: Parameters

text:
| Parameter                    | Value  | Description|
|------------------------------|--------|------------|
| crdb-guid         | string | The GUID of the database (required) |
| instance-id | string | The ID of the local instance to remove (required) |
| force                        |        | Removes the instance without purging data from the instance. <br>If --force is specified, you must run [`crdb-cli crdb purge-instance`]() from the removed instance. |
| no-wait                      |        | Does not wait for the task to complete |

title: Returns

text:
Returns the task ID of the task that is deleting the instance.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the instance to be removed and return `finished`.

title: Example

text: [code example]

code:
crdb-cli crdb remove-instance --crdb-guid <guid>
         --instance-id <instance-id>
         [ --force ]
         [ --no-wait ]

code:
$ crdb-cli crdb remove-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id 2 --force
Task b1eba5ba-90de-49e9-8678-d66daa1afb51 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished


title: crdb-cli crdb update

title: Overview

text:
Updates the configuration of an Active-Active database.

[code example]

If you want to change the configuration of the local instance only, use [`rladmin`]() instead.

title: Parameters

text:
| Parameter                                                           | Value                                                                                | Description                                                                                |
|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| crdb-guid \<guid\>                                                 | string                                                                                | GUID of the Active-Active database (required)                                                                                |
| bigstore-ram-size \<maximum_memory\>                                                  | size in bytes, kilobytes (KB), or gigabytes (GB)                                                                               | Maximum RAM limit for the  databases with Auto Tiering enabled, if activated                                                                                |
| memory-size \<maximum_memory\>                                                                | size in bytes, kilobytes (KB), or gigabytes (GB) | Maximum database memory (required)                                                                                |
| causal-consistency                                                  | true
false                                                                                | [Causal consistency]() applies updates to all instances in the order they were received |
| compression                                                         | 0-6                                                                                | The level of data compression:

 0 = No compression

 6 = High compression and resource load (Default: 3)                                                        |
| credentials id=\<id\>,username=\<username\>,password=\<password\> | strings                                                                                | Updates the credentials for access to the instance                                                                                |
| default-db-config \<configuration\>                                                  |                                                                                | Default database configuration from stdin. For a list of database settings, see the [CRDB database config object]() reference. |
| default-db-config-file \<filename\>                                | filepath                                                                                | Default database configuration from file                                                                                |
| encryption                                                          | true
false                                                                                | Activates or deactivates encryption                                                                                |
| force                                                               |                                                                                | Force an update even if there are no changes                                                                                |
| no-wait                                                             |                                                                                | Do not wait for the command to finish                                                                                |
| oss-cluster                                                         | true
false                                                                                | Activates or deactivates OSS Cluster mode                                                                                |
| eviction-policy                                                     | noeviction
allkeys-lru
allkeys-lfu
allkeys-random
volatile-lru
volatile-lfu
volatile-random
volatile-ttl | Updates [eviction policy]()                                                                                |
| featureset-version                                                  | true
false                                                                                | Updates to latest FeatureSet version                                                                                |
| update-module name=\<name>,featureset_version=\<version\>         | strings                                                                                | Update a module to the specified version                                                                                |
| update-db-config-modules                                        | true
false                                                                                | Updates module information in the CRDB configuration (default-db-config) based on the latest module data for the database. Use this option only after all CRDB database instances have upgraded their modules.      |

title: Returns

text:
Returns the task ID of the task that is updating the database.

If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be updated and then return "finished."

title: Examples

text:
The following example changes the maximum database memory:

[code example]

The following example shows how to change a default database configuration setting:

[code example]

code:
crdb-cli crdb update --crdb-guid <guid>
         [--no-wait]
         [--force]
         [--default-db-config <configuration> ]
         [--default-db-config-file <filename>]
         [--compression <0-6>]
         [--causal-consistency { true | false } ]
         [--credentials id=<id>,username=<username>,password=<password> ]
         [--encryption { true | false } ]
         [--oss-cluster { true | false } ]
         [--featureset-version { true | false } ]
         [--memory-size <maximum_memory>]
         [--bigstore-ram-size <maximum_memory>]
         [--eviction-policy { noeviction | allkeys-lru | allkeys-lfu | allkeys-random | volatile-lru | volatile-lfu | volatile-random | volatile-ttl }]
         [--update-module name=<name>,featureset_version=<version>]
         [--update-db-config-modules { true | false } ]

code:
$ crdb-cli crdb update --crdb-guid <crdb-guid> --memory-size 2GB
Task <task-id> created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished

code:
$ crdb-cli crdb update --crdb-guid <crdb-guid> --default-db-config '{"shards_count": <primary_shards_count>}'
Task <task-id> created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished


title: crdb-cli

summary: Manage Active-Active databases.

summary: Manage Active-Active databases.

title: crdb-cli crdb commands

summary: Manage Active-Active tasks.

title: crdb-cli task commands

title: Overview

text:
An [Active-Active database]() (also known as CRDB or conflict-free replicated database)
replicates your data across Redis Software clusters located in geographically distributed regions.
Active-Active databases allow read-write access in all locations, making them ideal for distributed applications that require fast response times and disaster recovery.

The Active-Active database on an individual cluster is called an **instance**.
Each cluster that hosts an instance is called a **participating cluster**.

An Active-Active database requires two or more participating clusters.
Each instance is responsible for updating the instances that reside on other participating clusters with the transactions it receives.
Write conflicts are resolved using [conflict-free replicated data types]() (CRDTs).

To programmatically maintain an Active-Active database and its instances, you can use the `crdb-cli` command-line tool.

title: `crdb-cli` commands

title: Use the crdb-cli

text:
To use the `crdb-cli` tool, use SSH to sign in to a Redis Software host with a user that belongs to the group that Redis Software was installed with (Default: **redislabs**).
If you sign in with a non-root user, you must add `/opt/redislabs/bin/` to your `PATH` environment variables.

`crdb-cli` commands use the syntax: `crdb-cli <command> <arguments>` to let you:

- Create, list, update, flush, or delete an Active-Active database.
- Add or remove an instance of the Active-Active database on a specific cluster.

Each command creates a task.

By default, the command runs immediately and displays the result in the output.

If you use the <nobr>`--no-wait`</nobr> flag, the command runs in the background so that your application is not delayed by the response.

Use the [`crdb-cli task` commands]() to manage Active-Active database tasks.

For each `crdb-cli` command, you can use <nobr>`--help`</nobr> for additional information about the command.


title: crdb-cli task cancel

summary: Attempts to cancel a specified Active-Active database task.

title: Overview

text:
Cancels the Active-Active database task specified by the task ID.

[code example]

title: Parameters

text:
| Parameter           | Value  | Description                         |
|---------------------|--------|-------------------------------------|
| task-id \<task_id\>  | string | An Active-Active database task ID (required) |

title: Returns

text:
Attempts to cancel an Active-Active database task.

Be aware that tasks may complete before they can be cancelled.

title: Example

text: [code example]

code: crdb-cli task cancel --task-id <task_id>

code: $ crdb-cli task cancel --task-id 2901c2a3-2828-4717-80c0-6f27f1dd2d7c


title: crdb-cli task commands

summary: Manage Active-Active tasks.

title: crdb-cli task cancel

summary: Lists active and recent Active-Active database tasks.

title: crdb-cli task list

summary: Shows the status of a specified Active-Active database task.

title: crdb-cli task status

title: Overview

text: The `crdb-cli task` commands help investigate Active-Active database performance issues.  They should not be used except as directed by Support.

title: `crdb-cli task` commands


title: crdb-cli task list

title: Overview

text:
Lists active and recent Active-Active database tasks.

[code example]

title: Parameters

title: Returns

text:
A table listing current and recent Active-Active tasks.  Each entry includes the following:

| Column | Description |
|--------|-------------|
| Task ID | String containing the unique ID associated with the task
Example: `e1c49470-ae0b-4df8-885b-9c755dd614d0` |
| CRDB-GUID | String containing the unique ID associated with the Active-Active database affected by the task
Example: `1d7741cc-1110-4e2f-bc6c-935292783d24` |
| Operation | String describing the task action
Example: `create_crdb` |
| Status | String indicating the task status
Example: `finished` |
| Worker name | String identifying the process handling the task
Example: `crdb_worker:1:0` |
| Started | TimeStamp value indicating when the task started ([UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time))
Example: `2022-10-12T09:33:41Z` |
| Ended | TimeStamp value indicating when the task ended (UTC)
Example: ` 2022-10-12T09:33:55Z` |

title: Example

text: [code example]

code: crdb-cli task list

code:
$ crdb-cli task list
TASK-ID    CRDB-GUID  OPERATION    STATUS    WORKER-NAME  STARTED    ENDED
<task-ID>  <crdb-ID>  <operation>  <result>  <worker-ID>  <started>  <ended>


title: crdb-cli task status

title: Overview

text:
Shows the status of a specified Active-Active database task.

[code example]

title: Parameters

text:
| Parameter           | Value  | Description                         |
|---------------------|--------|-------------------------------------|
| task-id \<task_id\>  | string | An Active-Active database task ID (required) |
| verbose              | N/A    | Returns detailed information when specified |
| no-verbose           | N/A    | Returns limited information when specified |

The `--verbose` and `--no-verbose` options are mutually incompatible; specify one or the other.

The `404 Not Found` error indicates an invalid task ID.  Use the [`task list`]() command to determine available task IDs.

title: Returns

text: Returns the status of an Active-Active database task.

title: Example

text: [code example]

code: crdb-cli task status --task-id <task_id>

code:
$ crdb-cli task status --task-id e1c49470-ae0b-4df8-885b-9c755dd614d0
Task-ID: e1c49470-ae0b-4df8-885b-9c755dd614d0
CRDB-GUID: 1d7741cc-1110-4e2f-bc6c-935292783d24
Operation: create_crdb
Status: finished
Worker-Name: crdb_worker:1:0
Started: 2022-10-12T09:33:41Z
Ended: 2022-10-12T09:33:55Z


title: Command-line utilities

summary: Reference for Redis Software command-line utilities, including rladmin, redis-cli, crdb-cli, and rlcheck.

summary: Manage Active-Active databases.

title: crdb-cli

summary: Run Redis commands.

title: redis-cli

summary: Manage Redis Software clusters and databases.

title: rladmin

summary: Verify nodes.

title: rlcheck

title: Overview

text: Redis Software includes a set of utilities to help you manage and test your cluster. To use a utility, run it from the command line.

title: Public utilities

text: Administrators can use these CLI tools to manage and test a Redis Software cluster. You can find the binaries in the `/opt/redislabs/bin/` directory.

title: Internal utilities

text:
The `/opt/redislabs/bin/` directory also contains utilities used internally by Redis Software and for troubleshooting.

Do not use these tools for normal operations.

| Utility | Description |
|---------|-------------|
| bdb-cli | `redis-cli` connected to a database. |
| ccs-cli | Inspect Cluster Configuration Store. |
| cnm_ctl | Manages services for provisioning, migration, monitoring, <br />resharding, rebalancing, deprovisioning, and autoscaling. |
| consistency_checker | Checks the consistency of Redis instances. |
| crdbtop | Monitor Active-Active databases. |
| debug_mode | Enables debug mode. |
| debuginfo | Collects cluster information. |
| dmc-cli | Configure and monitor the DMC proxy. |
| pdns_control | Sends commands to a running PowerDNS nameserver. |
| redis_ctl | Stops or starts Redis instances. |
| rl_rdbloader | Load RDB backup files to a server. |
| rlutil | Maintenance utility. |
| shard-cli | `redis-cli` connected to a shard. |
| supervisorctl | Manages the lifecycles of Redis Software services. |


title: redis-cli

summary: Run Redis commands.

title: Overview

text:
The `redis-cli` command-line utility lets you interact with a Redis database. With `redis-cli`, you can run [Redis commands]() directly from the command-line terminal or with [interactive mode](#interactive-mode).

If you want to run Redis commands without `redis-cli`, you can [connect to a database with Redis Insight]() and use the built-in [CLI]() prompt instead.

title: Install `redis-cli`

role: setup

text:
When you install Redis Software or Redis Open Source, it also installs the `redis-cli` command-line utility.

To learn how to install Redis and `redis-cli`, see the following installation guides:

- [Redis Open Source]()

- [Redis Software]()

- [Redis Software with Docker]()

title: Connect to a database

text:
To run Redis commands with `redis-cli`, you need to connect to your Redis database.

You can find endpoint and port details in the **Databases** list or the database’s **Configuration** screen.

title: Connect remotely

text:
If you have `redis-cli` installed on your local machine, you can use it to connect to a remote Redis database. You will need to provide the database's connection details, such as the hostname or IP address, port, and password.

[code example]

You can also provide the password with the `REDISCLI_AUTH` environment variable instead of the `-a` option:

[code example]

title: Connect over TLS

text:
To connect to a Redis Software or Redis Cloud database over TLS:

1. Download or copy the Redis Software server (or proxy) certificates.

    - For Redis Cloud, see [Download certificates]() for detailed instructions on how to download the server certificates (`redis_ca.pem`) from the [Redis Cloud console](https://cloud.redis.io/).

    - For Redis Software, copy the proxy certificate from the Cluster Manager UI (**Cluster > Security > Certificates > Server authentication**) or from a cluster node (`/etc/opt/redislabs/proxy_cert.pem`).

1. Copy the certificate to each client machine.

1. If your database doesn't require client authentication, provide the Redis Software server certificate (`redis_ca.pem` for Cloud or `proxy_cert.pem` for Software) when you connect:

    [code example]

1. If your database requires client authentication, provide your client's private and public keys along with the Redis Software server certificate (`redis_ca.pem` for Cloud or `proxy_cert.pem` for Software) when you connect:

    [code example]

title: Connect with Docker

text:
If your Redis database runs in a Docker container, you can use `docker exec` to run `redis-cli` commands:

[code example]

title: Basic use

text:
You can run `redis-cli` commands directly from the command-line terminal:

[code example]

For example, you can use `redis-cli` to test your database connection and store a new Redis string in the database:

[code example]

For more information, see [Command line usage](#command-line-usage).

title: Interactive mode

text:
In `redis-cli` [interactive mode](#interactive-mode), you can:

- Run any `redis-cli` command without prefacing it with `redis-cli`.
- Enter `?` for more information about how to use the `HELP` command and [set `redis-cli` preferences](#preferences).
- Enter [`HELP`](#showing-help-about-redis-commands) followed by the name of a command for more information about the command and its options.
- Press the `Tab` key for command completion.
- Enter `exit` or `quit` or press `Control+D` to exit interactive mode and return to the terminal prompt.

This example shows how to start interactive mode and run Redis commands:

[code example]

title: Examples

title: Check slowlog

text:
Run [`slowlog get`]() for a list of recent slow commands:

[code example]

title: Scan for big keys

text:
Scan the database for big keys:

[code example]

See [Scanning for big keys](#scanning-for-big-keys) for more information.

title: More info

text:
- [Redis CLI documentation]()
- [Redis commands reference]()

code: $ redis-cli -h <endpoint> -p <port> -a <password>

section_id: connect-remotely

code:
$ export REDISCLI_AUTH=<password>
$ redis-cli -h <endpoint> -p <port>

section_id: connect-over-tls

code:
redis-cli -h <endpoint> -p <port> --tls --cacert <redis_cert>.pem \
        --cert redis_user.crt --key redis_user_private.key

code: $ docker exec -it <Redis container name> redis-cli -p <port>

section_id: connect-with-docker

code: $ redis-cli -h <endpoint> -p <port> <Redis command>

section_id: basic-use

code:
$ redis-cli -h <endpoint> -p 12000 PING
PONG
$ redis-cli -h <endpoint> -p 12000 SET mykey "Hello world"
OK
$ redis-cli -h <endpoint> -p 12000 GET mykey
"Hello world"

section_id: interactive-mode

code: redis-cli -h <endpoint> -p <port> slowlog get <number of entries>

section_id: check-slowlog

code: redis-cli -h <endpoint> -p <port> --bigkeys

section_id: scan-for-big-keys


title: rladmin bind

summary: Manages the proxy policy for a specified database endpoint.

title: Overview

text: Manages the proxy policy for a specific database endpoint.

title: `bind endpoint exclude`

text:
Defines a list of nodes to exclude from the proxy policy for a specific database endpoint. When you exclude a node, the endpoint cannot bind to the node's proxy.

Each time you run an exclude command, it overwrites the previous list of excluded nodes.

[code example]

title: Parameters

text:
| Parameter | Type/Value                     | Description                                                                                |
|-----------|--------------------------------|-----------------------------------------------------------------------------------------------|
| db        | db:\<id\><br /> name           | Only allows endpoints for the specified database                                               |
| endpoint  | endpoint ID                    | Changes proxy settings for the specified endpoint                              |
| proxy     | list of proxy IDs          | Proxies to exclude                                                           |

title: Returns

text:
Returns `Finished successfully` if the list of excluded proxies was successfully changed. Otherwise, it returns an error.

Use [`rladmin status endpoints`]() to verify that the policy changed.

title: Example

text: [code example]

title: `bind endpoint include`

text:
Defines a list of nodes to include in the proxy policy for the specific database endpoint.

Each time you run an include command, it overwrites the previous list of included nodes.

[code example]

title: Parameters

text:
| Parameter | Type/Value                     | Description                                                                                |
|-----------|--------------------------------|-----------------------------------------------------------------------------------------------|
| db        | db:\<id\><br /> name           | Only allows endpoints for the specified database                                               |
| endpoint  | endpoint ID                    | Changes proxy settings for the specified endpoint                              |
| proxy     | list of proxy IDs          | Proxies to include                                                           |

title: Returns

text:
Returns `Finished successfully` if the list of included proxies was successfully changed. Otherwise, it returns an error.

Use [`rladmin status endpoints`]() to verify that the policy changed.

title: Example

text: [code example]

title: `bind endpoint policy`

text:
Changes the overall proxy policy for a specific database endpoint.

[code example]

title: Parameters

text:
| Parameter | Type/Value                     | Description                                                                                |
|-----------|--------------------------------|-----------------------------------------------------------------------------------------------|
| db        | db:\<id\>
 name           | Only allows endpoints for the specified database                                               |
| endpoint  | endpoint ID                    | Changes proxy settings for the specified endpoint                              |
| policy    | <nobr>'all-master-shards'</nobr>
 <nobr>'all-nodes'</nobr>
 'single' | Changes the [proxy policy](#proxy-policies) to the specified policy |

| Proxy policy | Description |
| - | - |
| all-master-shards | Multiple proxies, one on each master node (best for high traffic and multiple master shards)                     |
| all-nodes | Multiple proxies, one on each node of the cluster (increases traffic in the cluster, only used in special cases) |
| single | All traffic flows through a single proxy bound to the database endpoint (preferable in most cases)               |

title: Returns

text:
Returns `Finished successfully` if the proxy policy was successfully changed. Otherwise, it returns an error.

Use [`rladmin status endpoints`]() to verify that the policy changed.

title: Example

text: [code example]

code:
rladmin bind
        [ db { db:<id> | <name> } ]
        endpoint <id> exclude
        <proxy_id1 .. proxy_idN>

section_id: bind-endpoint-exclude

code:
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID    NAME   ID                  NODE      ROLE                      SSL
db:6     tr02   endpoint:6:1        node:2    all-nodes                 No
db:6     tr02   endpoint:6:1        node:1    all-nodes                 No
db:6     tr02   endpoint:6:1        node:3    all-nodes                 No
$ rladmin bind endpoint 6:1 exclude 2
Executing bind endpoint: OOO.
Finished successfully
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID    NAME   ID                 NODE      ROLE                       SSL
db:6     tr02   endpoint:6:1       node:1    all-nodes -2               No
db:6     tr02   endpoint:6:1       node:3    all-nodes -2               No

code:
rladmin bind
        [ db { db:<id> | <name> } ]
        endpoint <id> include
        <proxy_id1 .. proxy_idN>

section_id: bind-endpoint-include

code:
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID    NAME   ID                 NODE      ROLE                       SSL
db:6     tr02   endpoint:6:1       node:3    all-master-shards          No
$ rladmin bind endpoint 6:1 include 3
Executing bind endpoint: OOO.
Finished successfully
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID   NAME   ID                NODE      ROLE                          SSL
db:6    tr02   endpoint:6:1      node:1    all-master-shards +3          No
db:6    tr02   endpoint:6:1      node:3    all-master-shards +3          No

code:
rladmin bind
        [ db { db:<id> | <name> } ]
        endpoint <id>
        policy { single | all-master-shards | all-nodes }

section_id: bind-endpoint-policy

code:
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID    NAME   ID                 NODE      ROLE                       SSL
db:6     tr02   endpoint:6:1       node:1    all-nodes -2               No
db:6     tr02   endpoint:6:1       node:3    all-nodes -2               No
$ rladmin bind endpoint 6:1 policy all-master-shards
Executing bind endpoint: OOO.
Finished successfully
$ rladmin status endpoints db db:6
ENDPOINTS:
DB:ID    NAME   ID                 NODE      ROLE                       SSL
db:6     tr02   endpoint:6:1       node:3    all-master-shards          No


title: rladmin cluster certificate

summary: Sets cluster certificates.

title: `cluster certificate set <certificate_name>`

text:
Sets a cluster certificate to a specified PEM file.

[code example]

To set a certificate for a specific service, use the corresponding certificate name. See the [certificates table]() for the list of cluster certificates and their descriptions.

title: Parameters

text:
| Parameter | Type/Value | Description |
|-----------|------------|-------------|
| certificate_name | 'cm'
 'api'
 'proxy'
 'syncer'
 'metrics_exporter' | Name of the certificate to update. See the [certificates table]() for descriptions. |
| certificate_file | filepath | Path to the certificate file |
| key_file | filepath | Path to the key file (optional) |

title: Returns

text: Reports that the certificate was set to the specified file. Returns an error message if the certificate fails to update.

title: Example

text:
Update the proxy certificate:

[code example]

title: `cluster certificate set internal`

text:
Sets [customer-provided internode encryption certificates]().

[code example]

title: Parameters

text:
| Parameter | Type/Value | Description |
|-----------|------------|-------------|
| dpine_certificate_file | filepath | Path to the data plane internode encryption (DPINE) certificate file |
| dpine_key_file | filepath | Path to the data plane internode encryption (DPINE) key file |
| cpine_certificate_file | filepath | Path to the control plane internode encryption (CPINE) certificate file |
| cpine_key_file | filepath | Path to the control plane internode encryption (CPINE) key file |

title: Returns

text: Reports that the internal certificates were set to the specified files. Returns an error message if the certificates fail to update.

title: Example

text:
Set up [customer-provided internode encryption certificates]():

[code example]

code:
rladmin cluster certificate set <certificate_name>
        certificate_file <filepath>
        [ key_file <filepath> ]

code:
$ rladmin cluster certificate set proxy \
       certificate_file /tmp/proxy.pem
Set proxy certificate to contents of file /tmp/proxy.pem

code:
rladmin cluster certificate set internal
        dpine_certificate_file <filepath>
        dpine_key_file <filepath>
        cpine_certificate_file <filepath>
        cpine_key_file <filepath>

section_id: cluster-certificate-set-internal

code:
$ rladmin cluster certificate set internal \
       dpine_certificate_file /tmp/dpine_cert.pem \
       dpine_key_file /tmp/dpine_key.pem \
       cpine_certificate_file /tmp/cpine_cert.pem \
       cpine_key_file /tmp/cpine_key.pem


summary: Changes the password hashing algorithm.

title: Overview

text:
Changes the password hashing algorithm for the entire cluster. When you change the hashing algorithm, it rehashes the administrator password and passwords for all users, including default users.

[code example]

title: Parameters

text:
| Parameter | Type/Value | Description |
|-----------|------------|-------------|
| algorithm | SHA-256<br />PBKDF2 | Change to the specified hashing algorithm. The default hashing algorithm is `SHA-256`. |

title: Returns

text: Reports whether the algorithm change succeeded or an error occurred.

title: Example

text: [code example]

code: rladmin cluster change_password_hashing_algorithm <algorithm>

code:
$ rladmin cluster change_password_hashing_algorithm PBKDF2
Please confirm changing the password hashing algorithm
Please confirm [Y/N]: y
Algorithm changed