All Products
Search
Document Center

Tair (Redis® OSS-Compatible):In-house commands for instances in proxy mode

Last Updated:Mar 28, 2026

Tair (Redis OSS-compatible) provides a set of in-house commands for cluster and read/write splitting instances connected in proxy mode. These commands let you target specific data shards directly—something the standard Redis INFO, SCAN, and MONITOR commands cannot do in a proxied multi-shard environment.

Prerequisites

Before you begin, ensure that you have:

  • A Tair cluster or read/write splitting instance connected in proxy mode

Syntax conventions

NotationMeaning
UPPERCASECommand keyword
_italic_Variable — replace with an actual value
[option]Optional parameter; parameters without brackets are required
A|BMutually exclusive parameters — specify only one
...The preceding parameter can be repeated

Commands

INFO KEY

Syntax: INFO KEY _key_

Returns the hash slot and shard index that a key is assigned to. Use this command to check whether multiple keys land on the same slot — a requirement for multi-key commands in cluster instances.

The shard index returned by INFO KEY identifies a data shard node in a cluster instance, not a database index used by the SELECT command.

Example

INFO KEY foo

Response

slot:12182 node_index:0

IINFO

Syntax: IINFO _db_idx_ [_section_] [[_section_] ...]

Returns statistics for a specific data shard node, equivalent to running the native Redis INFO command on that shard.

ParameterDescriptionValid values
_db_idx_Index of the data shard node0 to (total number of cluster shards)
_section_(Optional) One or more INFO sections to returnSame sections as the native INFO command

Example

IINFO 1 Server

Response

"# Server\r\nredis_version:5.0.13\r\nos:Linux\r\ntcp_port:6379\r\nuptime_in_seconds:547026\r\nuptime_in_days:6\r\nhz:10\r\nlru_clock:4869333\r\n"

RIINFO

Syntax: RIINFO _db_idx_ _ro_slave_idx_ [_section_] [[_section_] ...]

Returns statistics for a specific read-only replica in a read/write splitting instance, equivalent to running the native Redis INFO command on that replica.

ParameterDescriptionValid values
_db_idx_Index of the primary shardDefault: 0
_ro_slave_idx_Index of the read-only replica0 to 5
_section_(Optional) One or more INFO sections to returnSame sections as the native INFO command

Example

RIINFO 0 0 Server

Response

"# Server\r\nredis_version:5.0.13\r\nos:Linux\r\ntcp_port:6379\r\nuptime_in_seconds:322575\r\nuptime_in_days:3\r\nhz:10\r\nlru_clock:4926418\r\n"

ISCAN

Syntax: ISCAN _db_idx_ _cursor_ [MATCH _pattern_] [COUNT _count_]

Runs a key scan on a specific data shard node in a cluster instance, equivalent to the native Redis SCAN command.

ParameterDescriptionValid values
_db_idx_Index of the data shard node0 to (total number of cluster shards)
_cursor_Cursor position; use 0 to start a new scanInteger ≥ 0
MATCH _pattern_(Optional) Return only keys matching the patternGlob-style pattern, e.g., user:*
COUNT _count_(Optional) Hint for how many keys to scan per callInteger > 0

Example: scan all keys on shard 0

ISCAN 0 0

Example: filter keys by pattern

ISCAN 0 0 MATCH user:*

Response

1) "0"
2) 1) "user:1001"
   2) "user:1002"
   3) "user:1003"

Example: limit keys scanned per call

ISCAN 0 0 COUNT 3

Response

1) "0"
2) 1) "dkjfd"
   2) "k"
   3) "9z9"
COUNT is a hint, not a hard limit. The actual number of keys returned may differ. Iterate until the cursor returns "0" to complete a full scan.

IMONITOR

Syntax: IMONITOR _db_idx_

Streams all commands processed by a specific data shard node in a cluster instance, equivalent to the native Redis MONITOR command.

ParameterDescriptionValid values
_db_idx_Index of the data shard node (Master)0 to (total number of cluster shards)

Run IMONITOR through Telnet. The example below shows a complete session:

$ telnet <host> <port>
Trying <host>...
Connected to <host>.

AUTH <password>
+OK

IMONITOR 0
+OK
+1682652565.538228 [0 127.0.0.1:38618] "info" "all"
+1682652566.538231 [0 127.0.0.1:38618] "info" "all"

QUIT
+OK

To stop the stream, send QUIT.

RIMONITOR

Syntax: RIMONITOR _db_idx_ _ro_slave_idx_

Streams all commands processed by a specific read-only replica in a read/write splitting instance, equivalent to the native Redis MONITOR command.

ParameterDescriptionValid values
_db_idx_Index of the primary shardDefault: 0
_ro_slave_idx_Index of the read-only replica0 to 5

Run RIMONITOR through Telnet. The example below shows a complete session:

$ telnet <host> <port>
Trying <host>...
Connected to <host>.

AUTH <password>
+OK

RIMONITOR 0 1
+OK
+1682653310.571527 [0 127.0.0.1:59492] "info" "all"
+1682653311.571573 [0 127.0.0.1:59492] "info" "all"

QUIT
+OK

To stop the stream, send QUIT.