Create an Active-Active geo-replicated database
Active-Active geo-replicated databases (formerly known as CRDBs) give applications write access to replicas of the dataset in different geographical locations.
The participating Redis Enterprise Software clusters that host the instances can be in distributed geographic locations. Every instance of an Active-Active database can receive write operations, and all operations are synchronized to all of the instances without conflict.
Steps to create an Active-Active database
- Create a service account - On each participating cluster, create a dedicated user account with the Admin role.
- Confirm connectivity - Confirm network connectivity between the participating clusters.
- Create Active-Active database - Connect to one of your clusters and create a new Active-Active database.
- Add participating clusters - Add the participating clusters to the Active-Active database with the user credentials for the service account.
- Verify creation - Log in to each of the participating clusters and verify your Active-Active database was created on them.
- Confirm Active-Active database synchronization - Test writing to one cluster and reading from a different cluster.
- Two or more machines with the same version of RS installed
- Network connectivity and cluster FQDN name resolution between all participating clusters
- Network time service listener (ntpd) configured and running on each node in all clusters
Create an Active-Active database
To create service accounts, on each participating cluster:
- In your web browser, open the admin console of the cluster that you want to connect to in order to create the Active-Active database.
By default, the address is:
- Go to access control > users and select .
- Enter the name, email, and password for the user, select the Admin role, and select .
- In your web browser, open the admin console of the cluster that you want to connect to in order to create the Active-Active database. By default, the address is:
To make sure that there is network connectivity between the participating clusters, telnet on port 9443 from each participating cluster to each of the other participating clusters.
telnet <target FQDN> 9443
In your web browser, open the admin console of the cluster that you want to connect to in order to create the Active-Active database. By default, the address is:
In databases, click .
If you do not have any databases on the node, you are prompted to create a database.
In the Deployment box, select Geo-Distributed and click Next to create an Active-Active database on RAM.
If your cluster supports Redis on Flash, in Runs on you can select Flash so that your database uses Flash memory. We recommend that you use AOF every 1 sec for the best performance during the initial Active-Active database sync of a new replica.
Enter the name of the new Active-Active database and select from the options:Note:
- You cannot enable or disable database clustering after the Active-Active database is created.
Replication - We recommend that all Active-Active database use replication for best intercluster synchronization performance. When replication is enabled, every Active-Active database master shard is replicated to a corresponding replica shard. The replica shards are then used to synchronize data between the instances, and the master shards are dedicated to handling client requests. We also recommend that you enable replica HA to ensure that the replica shards are highly-available for this synchronization.
Data persistence - To protect against loss of data stored in RAM, you can enable data persistence and select to store a copy of the data on disk with snapshots or Append Only File (AOF). AOF provides the fastest and most reliable method for instance failure recovery.
Default database access - When you configure a password for your database, all connections to the database must authenticate with the AUTH command. If you also configure an access control list, connections can specify other users for authentication, and requests are allowed according to the Redis ACLs specified for that user.
Configure the advanced options that you want for the database:
Access Control List - You can specify the user roles that have access to the database and the Redis ACLs that apply to those connections. You can only configure access control after the Active-Active database is created.
To define an access control list:
Endpoint port number (Required) - The port in the range 10000-19999 that clients must use to connect to the Active-Active database.
In the Database clustering option, you can either:
- Make sure the Database clustering is enabled and select the number of shards that you want to have in the database. When database clustering is enabled, databases are subject to limitations on Multi-key commands. You can increase the number of shards in the database at any time.
- Clear the Database clustering option to use only one shard so that you can use Multi-key commands without the limitations.
Redis OSS Cluster API reduces access times and latency with near-linear scalability. The Redis OSS Cluster API provides a simple mechanism for Redis clients to know the cluster topology.
Clients must first connect to the master node to get the cluster topology, and then they connect directly to the Redis proxy on each node that hosts a master shard.Note:You must use a client that supports the OSS cluster API to connect to a database that has the OSS cluster API enabled.
Eviction policy - The eviction policy for Active-Active databases is
Participating Clusters - You must specify the URL of the clusters that you want to host instances of an Active-Active database and the admin user account to connect to each cluster.
- In the Participating Clusters list, click to add clusters.
- For each cluster, enter the URL for the cluster (
https://<cluster_fqdn>:9443), enter the credentials (email address and password) for the service account that you created, and click .
Causal Consistency - Causal Consistency in an Active-Active database guarantees that the order of operations on a specific key is maintained across all instances of an Active-Active database. To enable Causal Consistency for an existing Active-Active database, use the REST API.
TLS - If you enable TLS when you create the Active-Active database, the nodes use the TLS mode Require TLS for CRDB communication only to require TLS authentication and encryption for communications between participating clusters. After you create the Active-Active database, you can set the TLS mode to Require TLS for all communications so that client communication from applications are also authenticated and encryption.
Test the connection to your member Redis Active-Active databases
With the Redis database created, you are ready to connect to your database. See Connect to Active-Active databases for tutorials and examples of multiple connection methods.