diff --git a/content/operate/rc/compatibility.md b/content/operate/rc/compatibility.md index 849c9fded3..f32823050b 100644 --- a/content/operate/rc/compatibility.md +++ b/content/operate/rc/compatibility.md @@ -19,6 +19,10 @@ Both [Redis Enterprise Software]({{< relref "/operate/rs" >}}) and Redis Cloud a Redis Enterprise Software and Redis Cloud support RESP2 and RESP3. In Redis Cloud, you can choose between RESP2 and RESP3 when you [create a database]({{< relref "/operate/rc/databases/create-database" >}}) and you can change it when you [edit a database]({{< relref "/operate/rc/databases/view-edit-database" >}}). For more information about the different RESP versions, see the [Redis serialization protocol specification]({{< relref "/develop/reference/protocol-spec" >}}#resp-versions). +## Client-side caching compatibility + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. See [Client-side caching compatibility with Redis Software and Redis Cloud]({{}}) for more information about compatibility. + ## Compatibility with Redis Cluster API Redis Cloud supports [Redis Cluster API]({{< relref "/operate/rc/databases/configuration/clustering#oss-cluster-api" >}}) on Redis Cloud Pro if it is enabled for a database. Review [Redis Cluster API architecture]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) to determine if you should enable this feature for your database. \ No newline at end of file diff --git a/content/operate/rs/databases/memory-performance/_index.md b/content/operate/rs/databases/memory-performance/_index.md index ccb9bc1cd2..9bf073ccb0 100644 --- a/content/operate/rs/databases/memory-performance/_index.md +++ b/content/operate/rs/databases/memory-performance/_index.md @@ -104,4 +104,10 @@ If applications need to access a value that is in flash, Redis Enterprise automatically brings the value into RAM. Depending on the flash hardware in use, applications experience slightly higher latency when bringing values back into RAM from flash. However subsequent -accesses to the same value is fast, once the value is in RAM. \ No newline at end of file +accesses to the same value is fast, once the value is in RAM. + +## Client-side caching + +Client-side caching allows Redis clients to store a subset of data in a local cache and avoid sending repeated requests to the Redis database. When used to cache frequently accessed data, this technique can improve performance by decreasing network traffic, latency, and load on the database. For more information about client-side caching, see the [client-side caching introduction]({{}}). + +Redis Software supports client-side caching for databases with Redis versions 7.4 and later. See [Client-side caching compatibility with Redis Software]({{}}) for more information about compatibility and configuration options. diff --git a/content/operate/rs/references/cli-utilities/rladmin/tune.md b/content/operate/rs/references/cli-utilities/rladmin/tune.md index 44b31eac41..5c4d527c50 100644 --- a/content/operate/rs/references/cli-utilities/rladmin/tune.md +++ b/content/operate/rs/references/cli-utilities/rladmin/tune.md @@ -47,6 +47,7 @@ rladmin tune cluster [ acl_pubsub_default { resetchannels | allchannels } ] [ resp3_default { enabled | disabled } ] [ automatic_node_offload { enabled | disabled } ] + [ default_tracking_table_max_keys_policy ] [ default_oss_sharding { enabled | disabled } ] ] ``` @@ -65,6 +66,7 @@ rladmin tune cluster | default_redis_version | version number | The default Redis database compatibility version used to create new databases.

The value parameter should be a version number in the form of "x.y" where _x_ represents the major version number and _y_ represents the minor version number. The final value corresponds to the desired version of Redis.

You cannot set _default_redis_version_ to a value higher than that supported by the current _redis_upgrade_policy_ value. | | default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created sharded databases' endpoints | | default_shards_placement | `dense`
`sparse` | New databases place shards according to the default [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) | +| default_tracking_table_max_keys_policy | integer (default: 1000000) | Defines the default value of the client-side caching invalidation table size for new databases. 0 makes the cache unlimited. | | expose_hostnames_for_all_suffixes | `enabled`
`disabled` | Exposes hostnames for all DNS suffixes | | failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | | login_lockout_counter_reset_after | time in seconds | Time after failed login attempt before the counter resets to 0 | @@ -144,6 +146,7 @@ rladmin tune db { db: | } [ data_internode_encryption { enabled | disabled } ] [ db_conns_auditing { enabled | disabled } ] [ resp3 { enabled | disabled } ] + [ tracking_table_max_keys ] ``` ### Parameters @@ -189,6 +192,7 @@ rladmin tune db { db: | } | slave_ha_priority | integer | Priority of the database in the replica high-availability mechanism | | syncer_mode | `distributed`
`centralized`| Configures syncer to run in distributed or centralized mode. For distributed syncer, the DMC policy must be all-nodes or all-master-nodes | | syncer_monitoring | `enabled`
`disabled` | Activates syncer monitoring | +| tracking_table_max_keys | integer | The client-side caching invalidation table size. 0 makes the cache unlimited. | | XADD behavior mode | Description | | - | - | diff --git a/content/operate/rs/references/compatibility/_index.md b/content/operate/rs/references/compatibility/_index.md index 0c39452568..66ca2d873a 100644 --- a/content/operate/rs/references/compatibility/_index.md +++ b/content/operate/rs/references/compatibility/_index.md @@ -20,6 +20,10 @@ Both Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) a Redis Enterprise Software and Redis Cloud support RESP2 and RESP3. See [RESP compatibility with Redis Enterprise]({{< relref "/operate/rs/references/compatibility/resp" >}}) for more information. +## Client-side caching compatibility + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. See [Client-side caching compatibility with Redis Software and Redis Cloud]({{}}) for more information about compatibility and configuration options. + ## Compatibility with open source Redis Cluster API Redis Enterprise supports [Redis OSS Cluster API]({{< relref "/operate/rs/clusters/optimize/oss-cluster-api" >}}) if it is enabled for a database. For more information, see [Enable OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). diff --git a/content/operate/rs/references/compatibility/client-side-caching.md b/content/operate/rs/references/compatibility/client-side-caching.md new file mode 100644 index 0000000000..1a3c2859c1 --- /dev/null +++ b/content/operate/rs/references/compatibility/client-side-caching.md @@ -0,0 +1,84 @@ +--- +Title: Client-side caching compatibility with Redis Software and Redis Cloud +alwaysopen: false +categories: +- docs +- operate +- rs +description: Redis Software and Redis Cloud compatibility with client-side caching. +linkTitle: Client-side caching +toc: 'true' +weight: 80 +--- + +Redis Software and Redis Cloud support [client-side caching]({{}}) for databases with Redis versions 7.4 or later. + +## Required database versions + +Client-side caching in Redis Software and Redis Cloud requires Redis database versions 7.4 or later. + +The following table shows the differences in client-side caching support by product: + +| Redis product | Client-side caching support | +|-------------------------|-----------------------------| +| Redis Community Edition | Redis v6.0 and later | +| Redis Cloud | Redis database v7.4 and later | +| Redis Software | Redis database v7.4 and later | + +## Supported RESP versions + +Client-side caching in Redis Software and Redis Cloud requires [RESP3]({{< relref "/develop/reference/protocol-spec#resp-versions" >}}). + +The following table shows the differences in client-side caching support for RESP by product: + +| Redis product with client-side caching | RESP2 | RESP3 | +|-------------------------|-------|-------| +| Redis Community Edition | | | +| Redis Cloud | | | +| Redis Software | | | + +## Two connections mode with REDIRECT not supported + +Unlike Redis Community Edition, Redis Software and Redis Cloud do not support [two connections mode]({{}}) or the `REDIRECT` option for [`CLIENT TRACKING`]({{}}). + +## Change tracking_table_max_keys for a database + +When client-side caching is enabled, Redis uses an invalidation table to track which keys are cached by each connected client. + +The configuration setting `tracking-table-max-keys` determines the maximum number of keys stored in the invalidation table and is set to `1000000` keys by default. Redis Software does not support using `CONFIG SET` to change this value, but you can use the REST API or rladmin instead. + +To change `tracking_table_max_keys` for a database in a Redis Software cluster: + +- [`rladmin tune db`]({{}}): + + ```sh + rladmin tune db db: tracking_table_max_keys 2000000 + ``` + + You can use the database name in place of `db:` in the preceding command. + +- [Update database configuration]({{}}) REST API request: + + ```sh + PUT /v1/bdbs/ + { "tracking_table_max_keys": 2000000 } + ``` + +## Change default tracking_table_max_keys + +The cluster-wide option `default_tracking_table_max_keys_policy` determines the default value of `tracking_table_max_keys` for new databases in a Redis Software cluster. `default_tracking_table_max_keys_policy` is set to `1000000` keys by default. + +To change `default_tracking_table_max_keys_policy`, use one of the following methods: + +- [`rladmin tune cluster`]({{}}) + + ```sh + rladmin tune cluster default_tracking_table_max_keys_policy 2000000 + ``` + +- [Update cluster policy]({{}}) REST API request: + + ```sh + PUT /v1/cluster/policy + { "default_tracking_table_max_keys_policy": 2000000 } + ``` diff --git a/content/operate/rs/references/compatibility/config-settings.md b/content/operate/rs/references/compatibility/config-settings.md index 28cd81b7c9..df5ac53de0 100644 --- a/content/operate/rs/references/compatibility/config-settings.md +++ b/content/operate/rs/references/compatibility/config-settings.md @@ -32,6 +32,7 @@ Redis Enterprise Software and [Redis Cloud]({{< relref "/operate/rc" >}}) only s | slowlog-max-len | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Value must be between 128 and 1024. | | stream-node-max-bytes | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | stream-node-max-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | +| tracking-table-max-keys | ❌ Standard
❌ Active-Active | ❌ Standard
❌ Active-Active | For Redis Software, use an [update database configuration]({{}}) REST API request or [`rladmin tune db`]({{}}) to set `tracking_table_max_keys` instead. | | zset-max-listpack-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | zset-max-listpack-value | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | | zset-max-ziplist-entries | ✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | | diff --git a/content/operate/rs/references/rest-api/objects/bdb/_index.md b/content/operate/rs/references/rest-api/objects/bdb/_index.md index 6d2cc3ccce..48c74b7bd1 100644 --- a/content/operate/rs/references/rest-api/objects/bdb/_index.md +++ b/content/operate/rs/references/rest-api/objects/bdb/_index.md @@ -144,6 +144,7 @@ An API object that represents a managed database in the cluster. | syncer_mode | The syncer for replication between database instances is either on a single node (centralized) or on each node that has a proxy according to the proxy policy (distributed). (read-only)
Values:
'distributed'
'centralized' | | tags | {{}}[{
"key": string,
"value": string
}, ...]{{
}} Optional list of tag objects attached to the database. Each tag requires a key-value pair.
**key**: Represents the tag's meaning and must be unique among tags (pattern does not allow special characters &,\<,>,")
**value**: The tag's value.| | tls_mode | Require TLS-authenticated and encrypted connections to the database
Values:
'enabled'
**'disabled'**
'replica_ssl' | +| tracking_table_max_keys | integer; The client-side caching invalidation table size. 0 makes the cache unlimited. | | type | Type of database
Values:
**'redis'**
'memcached' | | use_nodes | array of strings; Cluster node UIDs to use for database shards and bound endpoints | | version | string; Database compatibility version: full Redis/memcached version number, such as 6.0.6. This value can only change during database creation and database upgrades.| diff --git a/content/operate/rs/references/rest-api/objects/cluster_settings.md b/content/operate/rs/references/rest-api/objects/cluster_settings.md index 1ee92ff7a4..d3db7c0d97 100644 --- a/content/operate/rs/references/rest-api/objects/cluster_settings.md +++ b/content/operate/rs/references/rest-api/objects/cluster_settings.md @@ -30,6 +30,7 @@ Cluster resources management policy | default_provisioned_redis_version | string | Default Redis version | | default_sharded_proxy_policy | `single`

`all-master-shards`

`all-nodes` | Default proxy_policy for newly created sharded databases' endpoints | | default_shards_placement | `dense`
`sparse` | Default shards_placement for a newly created databases | +| default_tracking_table_max_keys_policy | integer (default: 1000000) | Defines the default value of the client-side caching invalidation table size for new databases. 0 makes the cache unlimited. | | endpoint_rebind_propagation_grace_time | integer | Time to wait between the addition and removal of a proxy | | failure_detection_sensitivity | `high`
`low` | Predefined thresholds and timeouts for failure detection (previously known as `watchdog_profile`)
• `high` (previously `local-network`) – high failure detection sensitivity, lower thresholds, faster failure detection and failover
• `low` (previously `cloud`) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | | login_lockout_counter_reset_after | integer | Number of seconds that must elapse between failed sign in attempts before the lockout counter is reset to 0. |