Why "config get maxmemory" is not available in Redis Enterprise as it is for OSS?

Last updated 22, Mar 2024

Question

Why config get maxmemory is not available in Redis Enterprise as it is for OSS?

Answer

The maxmemory variable is available in Redis OSS and represents a single shard. However, it is not exposed for databases in Redis Enterprise Cluster, because in Redis Enterprise Cluster, databases may be represented by one or more shards.  The value is available using the API, and is provided in the memory_size attribute. Here is an example of the command:

curl -v -k -u <ADMIN_EMAIL>:<ADMIN_PSW> -H "Content-Type: application/json" -X GET https://<CLUSTER_FQDN>:9443/v1/bdbs/<DB_ID>

In the response, look for the memory_size attribute.