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.

Prerequisites

Before you enable Redis OSS Cluster API, make sure that:

  • The database uses the standard hashing policy.
  • The database proxy policy is all-master-shards.
  • The database proxy policy does not use node include or exclude.

When you enable Redis OSS Cluster API, multi-key commands are only allowed when all keys are mapped to the same slot. To verify that your database meets this requirement, make sure that the CLUSTER KEYSLOT reply is the same for all keys in the multi-key command.

Enabling OSS Cluster API support from the web UI

To configure an Redis Enterprise Software (RS) database to use the OSS Cluster API from the Web UI:

  1. Go to: databases
  2. Either:
    • Click on an existing database and in configuration click Edit.
    • Click Add and create database
  3. Click Show advance options and select OSS Cluster API support.
    Note -
    The Redis OSS Cluster API setting applies to the specified database only, not to the entire cluster.
  4. Save the database:
    • For an existing database, click Update.
    • For a new database, configure the database settings and click Activate.

Enabling OSS Cluster API support from the command line

To configure an RS database, including Replica Of databases, to use the OSS Cluster API from the command line:

  1. To get the database ID for your database, run:

    $ sudo rladmin info db | grep test
    db:4 [test]:
    

    In this example, the database ID is 4.

  2. To enable the OSS Cluster API for the database, run:

    rladmin tune db <database name or ID> oss_cluster enabled
    
    Note -
    The Redis OSS Cluster API setting applies to the specified database only, not to the entire cluster.

To disable OSS Cluster API with rladmin, run: rladmin tune db <database name or ID> oss_cluster disable

Managing OSS Cluster API support for Active-Active databases from the command line

To configure an RS Active-Active database (formerly known as CRDB) to use the OSS Cluster API from the command line:

  1. To create an Active-Active database with OSS Cluster API, run:

    crdb-cli crdb create --name <name> --memory-size 10g --port <port>
    --sharding true --shards-count 2 --replication true --oss-cluster true
    --instance fqdn=<fqdn>,username=<username>,password=<pass>
    --instance fqdn=<fqdn>,username=<username>,password=<pass>
    --instance fqdn=<fqdn>,username=<username>,password=<pass>
    
  2. To get the CRDB-GUID for your Active-Active database, run:

    $ crdb-cli crdb list
    CRDB-GUID                             NAME       REPL-ID  CLUSTER-FQDN
    2d26de9a-4ed5-404d-a543-459eadf76ce2  Database1  1        cluster1.local
    
  3. To enable the OSS Cluster API for the Active-Active database, run:

    crdb-cli crdb update --crdb-guid <CRDB-GUID> --oss-cluster true
    
    Note -
    The Redis OSS Cluster API setting applies to all of the instances of the Active-Active database.

To disable OSS Cluster API with rladmin, run: crdb-cli crdb update --crdb-guid <CRDB-GUID> --oss-cluster false