ApsaraDB for Redis allows you to modify specific instance parameters. This topic describes the parameters that are supported in different engine versions and architectures.

Usage notes

  • Some parameters are not supported in earlier minor versions. If your instance is in an earlier minor version, an error message may appear when you configure the parameters. For more information about how to update the minor version, see Upgrade the minor version.
  • After you submit the modification for specific parameters, your instance is automatically restarted. The instance is disconnected for a few seconds during the restart process. On the page for modifying parameters in the ApsaraDB for Redis console, the Restart and Take Effect column indicates whether a restart is required for the modification to take effect. For more information, see Modify the parameters of an ApsaraDB for Redis instance.

Supported parameters and descriptions

The following sections describe the comments that are used in the table of this topic:

  • The ✔️ symbol indicates that the major version or architecture supports the parameter.
  • The ❌ symbol indicates that the major version or architecture does not support the parameter.
Note
  • To ensure the stability of ApsaraDB for Redis instances, the system allows you to configure only a limited number of parameters. If a parameter is not described in this topic, you cannot modify the parameter.
  • For more information about instance architectures, see Standard instances, Cluster instances, and Read/write splitting instances.

Parameter Description Major version and architecture
Redis 5.0 Redis 4.0 Redis 2.8
#no_loose_audit-read-enabled
Specifies whether to enable read request audit. After you enable this feature, you can view information about read requests in the audit log. Valid values:
  • yes: enables read request audit.
  • no: disables read request audit. This is the default value.

Standard

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

#no_loose_check-whitelist-always
Specifies whether to check whether a client IP address is in the whitelist of an ApsaraDB for Redis instance if password-free access is enabled in a virtual private cloud (VPC). If you set this parameter to yes, the whitelist still takes effect for password-free access over a VPC. Valid values:
  • yes: checks whether a client IP address is in the whitelist.
  • no: does not check whether a client IP address is in the whitelist. This is the default value.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

#no_loose_disabled-commands
The commands to be disabled. You can disable high-risk commands or commands that have high time complexity, such as flushall, flushdb, keys, hgetall, eval, evalsha, and script.
Note The commands must be written in lowercase letters. Separate multiple commands with commas (,).

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

#no_loose_sentinel-enabled
Specifies whether to enable the Sentinel-compatible mode. Valid values:
  • yes: enables the Sentinel-compatible mode.
  • no: disables the Sentinel-compatible mode. This is the default value.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

#no_loose_ssl-enabled
Specifies whether to enable secure sockets layer (SSL) encryption. Valid values:
  • yes: enables SSL encryption.
  • no: disables SSL encryption. This is the default value.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

#no_loose_statistics-cmds

The commands about which you want to collect statistics. By default, this parameter is empty and no statistics are collected. Separate multiple commands with commas (,).

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

#no_loose_statistics-ip-enable
Specifies whether to collect statistics about IP addresses. Valid values:
  • yes: collects statistics about IP addresses.
  • no: does not collect statistics about IP addresses. This is the default value.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

#no_loose_statistics-keys

The keys about which you want to collect statistics. By default, the parameter is empty and no statistics are collected. Separate multiple keys with commas (,).

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

#no_loose_tls-min-version
The earliest TLS version supported by the instance. Valid values:
  • TLSv1. This is the default value.
  • Tlsv1.1.
  • TLSv1.2.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

cluster_compat_enable
Specifies whether to enable support for Redis-native cluster syntax. Valid values:
  • 0: disables support for Redis-native cluster syntax.
  • 1: enables support for Redis-native cluster syntax. This is the default value.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

max_session_processing

The maximum number of pending requests that are allowed per connection. If a proxy server forwards requests from a client to a data node but does not receive a response from the data node, then the requests are pending. This parameter is used to prevent pending requests that are caused by capability difference between the frontend and backend of proxy servers. This avoids an increase in memory usage.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

ptod_enabled
Specifies whether to pass through client IP addresses to data nodes through the proxy server. Valid values:
  • 0: does not pass through client IP addresses to data nodes. This is the default value.
  • 1: passes through client IP addresses to data nodes.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

query_cache_enabled Specifies whether to enable the proxy query cache feature. For more information, see Use proxy query cache to address issues caused by hotkeys. Valid values:
  • 0: disables the proxy query cache feature. This is the default value.
  • 1: enables the proxy query cache feature.
Notice
  • Only performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair) deployed in the Singapore (Singapore) region support this parameter. You must update these instances and proxy servers to the latest minor version to use this parameter.
  • The key-value pairs of the hotkeys cached on proxy servers are not updated within the validity period. Therefore, make sure that your business supports eventual consistency within the validity period .

Standard ❌

Cluster ✔️

Read/write splitting ❌

query_cache_expire The proxy query cache mode. Valid values:
  • 0: caches data only of the hotkeys pushed by data shards. This is the default value.
  • 1: caches data of all keys. The cached keys are evicted based on the Least Recently Used (LRU) algorithm.
Notice
  • Only performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair) deployed in the Singapore (Singapore) region support this parameter. You must update these instances and proxy servers to the latest minor version to use this parameter.
  • The maximum cache space of proxy servers is 100 MB per thread. Therefore, if the value of this parameter is set to 1, the proxy servers evict keys based on the LRU algorithm. This may reduce the cache hit ratio and degrade overall performance.

Standard ❌

Cluster ✔️

Read/write splitting ❌

query_cache_mode The validity period of cached data. Unit: milliseconds. Valid values: 100 to 60000. Default value: 1000.
  • If the original data is modified within the validity period, the modification is not synchronized to the cache. In this case, dirty data is returned for duplicate read requests until the cache expires.
  • You must evaluate the value of this parameter based on your business requirements and tolerance for dirty data. If the value is smaller than required, the cache hit ratio is reduced. If the value is greater than required, the client reads dirty data for an extended period of time.
Note Only performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair) deployed in the Singapore (Singapore) region support this parameter. You must update these instances and proxy servers to the latest minor version to use this parameter.

Standard ❌

Cluster ✔️

Read/write splitting ❌

readonly_lua_route_ronode_enable
Specifies whether to enable Lua scripting on read replicas. Valid values:
  • 0: disables Lua scripting. Read replicas do not support Lua scripts. The master node processes Lua scripts. This is the default value.
  • 1: enables Lua scripting. Lua scripts that include only read requests are forwarded to read replicas.

Standard ❌

Cluster ❌️

Read/write splitting ✔️

Standard ❌

Cluster ❌️

Read/write splitting ✔️

read_request_only_ronode_whenrwsplit_enable
Specifies whether to enable unidirectional forwarding for requests from accounts that have read-only permissions. Valid values:
  • 0: disables unidirectional forwarding. Requests from accounts that have read-only permissions are forwarded to all nodes including the master node based on weights. This is the default value.
  • 1: enables unidirectional forwarding. Requests from accounts that have read-only permissions are forwarded only to read replicas.

Standard ❌

Cluster ❌️

Read/write splitting ✔️

Standard ❌

Cluster ❌️

Read/write splitting ✔️

Standard ❌

Cluster ❌️

Read/write splitting ✔️

rt_threshold_ms
The threshold of slow query logs for a proxy server. Unit: milliseconds. If the proxy server processes a request for a period of time longer than the specified threshold, the request is recorded in a slow query log.
Note This time starts when the proxy server sends a request to the data node and ends when the proxy server receives the response.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

script_check_enable
Specifies whether to check that the keys used in Lua scripts are mapped to the same slot. Valid values:
  • 0: does not check whether the keys are mapped to the same slot.
  • 1: checks whether the keys are mapped to the same slot. This is the default value.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

transfer_subscrible_to_psubscrible_enable
Specifies whether to enable the feature of converting SUBSCRIBE to PSUBSCRIBE. Valid values:
  • 0: disables this feature. The two commands cannot be converted. This is the default value.
  • 1: enables this feature. The proxy server can convert SUBSCRIBE to PSUBSCRIBE.
    Note If you use the PUB/SUB commands in Lua scripts, and the channel to which you have subscribed cannot receive messages, you can enable this feature to fix this issue.

Standard ❌

Cluster ✔️

Read/write splitting ✔️

Standard ❌

Cluster ✔️

Read/write splitting ✔️

appendonly
Specifies whether to enable append-only file (AOF) persistence. Valid values:
  • yes: enables AOF persistence. This is the default value.
  • no: disables AOF persistence.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

client-output-buffer-limit pubsub
The output buffer limits of publisher and subscriber clients. The clients are disconnected if the specified limits are reached. Specify a value for this parameter in the following format: <hard limit> <soft limit> <soft seconds>. Default value: 33554432 8388608 60.
  • <hard limit>: disconnects a client if the output buffer of the client is larger than or equal to the hard limit value. The hard limit value is measured in bytes.
  • <soft limit> and <soft seconds>: disconnects a client if the two conditions are met. One of the conditions is that the output buffer of the client is larger than or equal to the soft limit value. The other condition is that the situation lasts for a period longer than or equal to the soft seconds value. The soft limit value is measured in bytes. The soft seconds value is measured in seconds.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

dynamic-hz
Specifies whether to enable a dynamic hz value. Valid values:
  • yes: enables a dynamic hz value. This is the default value.
  • no: disables a dynamic hz value.

Standard ✔️

Cluster ❌️

Read/write splitting ❌

hash-max-ziplist-entries
The maximum number of key-value pairs stored in a hash. The ziplist encoding is used only if both of the following conditions are met:
  • The number of bytes of the key or value in each key-value pair stored in the hash is smaller than the value of the hash-max-ziplist-value parameter.
  • The number of key-value pairs stored in the hash is smaller than the value of the hash-max-ziplist-entries parameter.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

hash-max-ziplist-value
The maximum number of bytes of the key or value in each key-value pair stored in a hash. The ziplist encoding is used only if both of the following conditions are met:
  • The number of bytes of the key or value in each key-value pair stored in the hash is smaller than the value of the hash-max-ziplist-value parameter.
  • The number of key-value pairs stored in the hash is smaller than the value of the hash-max-ziplist-entries parameter.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

hz
Specifies how frequently tasks are performed in the background. For example, you can specify how frequently tasks are performed to evict expired keys. Valid values: 1 to 500. Default value: 10, indicating that each task is performed 10 times per second.
Note A higher value results in higher CPU consumption but allows the system to delete expired keys and close timeout connections more frequently. We recommend that you specify a value smaller than or equal to 100.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

lazyfree-lazy-eviction
Specifies whether to enable the eviction feature based on the lazyfree mechanism. Valid values:
  • yes: enables the eviction feature based on the lazyfree mechanism.
  • no: disables the eviction feature based on the lazyfree mechanism. This is the default value.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

lazyfree-lazy-expire
Specifies whether to delete expired keys based on the lazyfree mechanism. Valid values:
  • yes: enables expired key deletion based on the lazyfree mechanism. This is the default value.
  • no: disables asynchronous data deletion based on the lazyfree mechanism.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

lazyfree-lazy-server-del
Specifies whether to asynchronously delete data based on the lazyfree mechanism for an implicit DEL operation. Valid values:
  • yes: enables asynchronous data deletion based on the lazyfree mechanism. This is the default value.
  • no: disables asynchronous data deletion based on the lazyfree mechanism.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

lazyfree-lazy-user-del Specifies whether to asynchronously delete data based on the lazyfree mechanism when a user runs the DEL command. Valid values:
  • yes: enables asynchronous data deletion based on the lazyfree mechanism. This is the default value.
  • no: disables asynchronous data deletion based on the lazyfree mechanism.
list-compress-depth
The number of nodes that are not compressed at both ends in a list. Valid values: 0 to 65535.
  • 0: does not compress nodes of the list. This is the default value.
  • 1 to 65535: does not compress the specified number of nodes from each end of the list but compresses in-between nodes.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

list-max-ziplist-entries

The maximum number of elements stored in a list. The ziplist encoding is used only if both of the following conditions are met:

  • The number of bytes in each element stored in the list is smaller than the value of the list-max-ziplist-value parameter.
  • The number of elements stored in the list is smaller than the value of the list-max-ziplist-entries parameter.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

list-max-ziplist-value

The maximum number of bytes in each element stored in a list. The ziplist encoding is used only if both of the following conditions are met:

  • The number of bytes in each element stored in the list is smaller than the value of the list-max-ziplist-value parameter.
  • The number of elements stored in the list is smaller than the value of the list-max-ziplist-entries parameter.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

list-max-ziplist-size
  • The maximum size of each ziplist in a quicklist. A positive number indicates the maximum number of elements in each ziplist of a quicklist. For example, if you set this parameter to 5, each ziplist of a quicklist can contain a maximum of five elements.
  • A negative value indicates the maximum number of bytes in each ziplist of a quicklist. Valid values:
    • -5: specifies that each ziplist of a quicklist cannot exceed 64 KB.
    • -4: specifies that each ziplist of a quicklist cannot exceed 32 KB.
    • -3: specifies that each ziplist of a quicklist cannot exceed 16 KB.
    • -2: specifies that each ziplist of a quicklist cannot exceed 8 KB. This is the default value.
    • -1: specifies that each ziplist of a quicklist cannot exceed 4 KB.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

maxmemory-policy
The policy used to evict keys if the memory is exhausted. Valid values: LRU means least recently used. LFU means least frequently used. LRU, LFU, and time-to-live (TTL) policies are implemented by using approximation and randomized algorithms.
  • volatile-lru: evicts the LRU keys among keys with an expire set.
  • allkeys-lru: evicts the LRU keys among all keys.
  • volatile-lfu: evicts LFU keys among keys with an expire set.
  • allkeys-lfu: evicts LFU keys among all keys.
  • volatile-random: randomly evicts keys among keys with an expire set.
  • allkeys-random: randomly evicts keys among all keys.
  • volatile-ttl: evicts keys that have a shorter TTL among keys with an expire set.
  • noeviction: specifies that the system does not evict keys, but returns an error for write operations.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

notify-keyspace-events
The types of events of which the Redis server can notify clients. The value of this parameter is a combination of the following characters.
  • K: keyspace events. All notifications are published with a __keyspace@<db>__ prefix.
  • E: keyevent events. All notifications are published with a __keyevent@<db>__ prefix.
  • g: generic events that are not related to specific commands, such as DEL, EXPIRE, and RENAME.
  • $: events of string commands.
  • l: events of list commands.
  • s: events of set commands.
  • h: events of hash commands.
  • z: events of sorted set commands.
  • x: events of expired keys. An expiration event is triggered when an expired key is deleted.
  • e: eviction events. An eviction event is triggered when a key is evicted for maxmemory.
  • A: the alias for g$lshzxe.
Note The specified parameter must include at least K or E. Otherwise, no event is triggered.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

set-max-intset-entries
The maximum number of data entries in a set to support intset encoding. A set uses intset encoding if both of the following conditions are met:
  • The number of entries in the set is smaller than or equal to the value of the set-max-intset-entries parameter.
  • The set contains only radix-10 integers in the range of 64-bit signed integers.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

slowlog-log-slower-than

The threshold to log slow queries. You can set this parameter to log an operation if the execution duration of the operation exceeds the threshold in microseconds. Valid values: 10000 to 10000000. Default value: 20000.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

slowlog-max-len

The maximum number of entries that can be stored in the slow query log. Valid values: 100 to 10000. Default value: 1024.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

stream-node-max-bytes
The maximum amount of memory that each macro node in a stream can consume. Valid values: 0 to 999999999999999. Unit: bytes.
Note A value of 0 specifies that the amount of memory on each node is unlimited.

Standard ✔️

Cluster ❌️

Read/write splitting ❌

stream-node-max-entries
The maximum number of entries stored on each macro node in a stream. Valid values: 0 to 999999999999999.
Note A value of 0 specifies that the number of entries on each node is unlimited.

Standard ✔️

Cluster ❌️

Read/write splitting ❌

timeout
The timeout period of connections. The system closes a connection to a client if the connection has been idle for the specified period of time. Valid values: 0 to 100000. Unit: seconds.
Note A value of 0 specifies that no timeout period is specified for connections.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

zset-max-ziplist-entries
The maximum number of key-value pairs stored in a sorted set and the maximum number of bytes of the key or value of each key-value pair stored in a sorted set. The ziplist encoding is used only if both of the following conditions are met:
  • The number of bytes of the key or value in each key-value pair stored in the sorted set is smaller than the value of the zset-max-ziplist-value parameter.
  • The number of key-value pairs stored in the sorted set is smaller than the value of the zset-max-ziplist-entries parameter.

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

Standard ✔️

Cluster ✔️

Read/write splitting ✔️

zset-max-ziplist-value