Valkey and Redis OSS configuration and limits - Amazon ElastiCache

Valkey and Redis OSS configuration and limits

The Valkey and Redis OSS engines each provides a number of configuration parameters, some of which are modifiable in ElastiCache (Redis OSS) and some of which are not modifiable to provide stable performance and reliability.

Serverless caches

For serverless caches, parameter groups are not used and all Valkey or Redis OSS configuration is not modifiable. The following Valkey or Redis OSS parameters are in place:

Name Details Description
acl-pubsub-default

allchannels

Default pubsub channel permissions for ACL users on the cache.
client-output-buffer-limit

normal 0 0 0

pubsub 32mb 8mb 60

Normal clients have no buffer limit. PUB/SUB clients will be disconnected if they breach 32MiB backlog, or breach 8MiB backlog for 60s.
client-query-buffer-limit 1 GiB The maximum size of a single client query buffer. Additionally, clients cannot issue a request with more than 4,000 arguments.
cluster-allow-pubsubshard-when-down yes This allows the cache to serve pubsub traffic while the cache is partially down.
cluster-allow-reads-when-down yes This allows the cache to serve read traffic while the cache is partially down.
cluster-enabled yes All serverless caches are cluster mode enabled, which allows them to transparently partition their data across multiple backend shards. All slots are surfaced to clients as being owned by a single virtual node.
cluster-require-full-coverage no When the keyspace is partially down (i.e. at least one hash slot is inaccessible), the cache will continue accepting queries for the part of the keyspace that is still covered. The entire keyspace will always be "covered" by a single virtual node in cluster slots.
lua-time-limit

5000

The maximum execution time for a Lua script, in milliseconds, before ElastiCache takes action to stop the script.

If lua-time-limit is exceeded, all Valkey or Redis OSS commands may return an error of the form ____-BUSY. Since this state can cause interference with many essential Valkey or Redis OSS operations, ElastiCache will first issue a SCRIPT KILL command. If this is unsuccessful, ElastiCache will forcibly restart Valkey or Redis OSS.

maxclients 65000 The maximum number of clients that can be connected to the cache at one time. Further connections established may or may not succeed.
maxmemory-policy volatile-lru Items with a TTL set are evicted following least-recently-used (LRU) estimation when a cache's memory limit is reached.
notify-keyspace-events (an empty string) Keyspace events are currently not supported on serverless caches.
port

Primary port: 6379

Read port: 6380

Serverless caches advertise two ports with the same hostname. The primary port allows writes and reads, whereas the read port allows lower-latency eventually-consistent reads using the READONLY command.
proto-max-bulk-len 512 MiB The maximum size of a single element request.
timeout 0 Clients are not forcibly disconnected at a specific idle time, but they may be disconnected during steady-state for load balancing purposes.

Additionally, the following limits are in place:

Name Details Description
Key name length 4 KiB The maximum size for a single Valkey or Redis OSS key or channel name. Clients referencing keys larger than this will receive an error.
Lua script size 4 MiB The maximum size of a single Valkey or Redis OSS Lua script. Attempts to load a Lua script larger than this will receive an error.
Slot size 32 GiB The maximum size of a single Valkey or Redis OSS hash slot. Clients trying to set more data than this on a single Valkey or Redis OSS slot will trigger the eviction policy on the slot, and if no keys are evictable, will receive an out of memory (OOM) error.

Self-designed clusters

For self-designed clusters, see Valkey and Redis OSS parameters for the default values of configuration parameters and which are configurable. The default values are generally recommended unless you have a specific use case requiring them to be overridden.