From c681765de77b210451c64cdb613263fbbb0f2ec0 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Thu, 5 Mar 2026 16:07:48 -0600 Subject: [PATCH 01/11] AI rough draft --- content/operate/kubernetes/flex/_index.md | 83 +++++++++ .../operate/kubernetes/flex/get-started.md | 116 ++++++++++++ content/operate/kubernetes/flex/plan.md | 169 ++++++++++++++++++ content/operate/kubernetes/flex/scale.md | 97 ++++++++++ 4 files changed, 465 insertions(+) create mode 100644 content/operate/kubernetes/flex/_index.md create mode 100644 content/operate/kubernetes/flex/get-started.md create mode 100644 content/operate/kubernetes/flex/plan.md create mode 100644 content/operate/kubernetes/flex/scale.md diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md new file mode 100644 index 0000000000..7bd7458028 --- /dev/null +++ b/content/operate/kubernetes/flex/_index.md @@ -0,0 +1,83 @@ +--- +title: Redis Flex on Kubernetes +alwaysopen: false +categories: +- docs +- operate +- kubernetes +description: Extend Redis databases with Flash storage for large-scale, cost-efficient deployments on Kubernetes. +hideListLinks: true +linkTitle: Redis Flex +weight: 41 +--- + +Redis Flex extends your database capacity by combining RAM and Flash (SSD) storage. This tiered architecture keeps frequently accessed (hot) data in RAM for sub-millisecond latency while storing less active (warm) data on Flash to reduce costs and increase capacity. + +Redis Flex databases work with your existing Redis applications and the Redis API without modification. + +## How Redis Flex works + +### Automatic data tiering + +Redis Flex moves data between RAM and Flash based on access patterns: + +- Frequently accessed data stays in high-speed RAM. +- Less active data moves to cost-efficient Flash storage. +- Data accessed from Flash promotes back to RAM automatically. + +Redis uses an LRU (least recently used) eviction policy to manage data placement. When memory pressure increases, Redis Flex identifies cold objects, transfers them to Flash, and frees RAM for new or frequently accessed keys. + +This process requires no application changes. Your existing Redis commands work across both storage tiers. + +### Storage engine + +Redis Flex uses Speedb, a high-performance key-value storage engine optimized for Flash drives: + +- Redis handles all data operations in memory. +- Speedb manages the Flash storage layer. +- This design delivers predictable latency and throughput as datasets grow beyond RAM limits. + +### Key and value offloading (Redis 8.2+) + +Starting with Redis 8.2, Redis Flex offloads both keys and values to Flash: + +| Redis version | What moves to Flash | +|---------------|----------------------------------| +| Before 8.2 | Values only (keys remain in RAM) | +| 8.2 and later | Both keys and values | + +This capability increases dataset density per node and reduces RAM consumption. + +## When to use Redis Flex + +Use Redis Flex when you need to: + +- Run Redis at terabyte scale while maintaining high throughput and sub-10 ms latency +- Power real-time feature stores for machine learning applications like fraud detection, recommendation systems, and personalization engines +- Operate large distributed caches that require elastic scaling and consistent performance under heavy load +- Reduce infrastructure costs by combining high-speed RAM with cost-efficient Flash storage + +## What Redis Flex is not + +Redis Flex optimizes for performance, elasticity, and scalability—not long-term data persistence. + +Although Redis Flex retains data in memory or Flash during operation, don't use it as a primary system of record or persistent storage layer. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like AOF (Append-Only File), RDB snapshots, or both. + +For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). + +## Redis Flex and Auto Tiering + +Redis Flex replaces Auto Tiering. The Redis Enterprise operator selects the appropriate implementation based on your Redis version: + +| Kubernetes operator version | Implementation | +|-----------------------------|----------------| +| 8.0.2-2 and later | Redis Flex | +| 7.22.2-22 and earlier | Auto Tiering | + +For Redis Enterprise for Kubernetes version 7.22.2-22 or earlier, see [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}). + +## Next steps + +- [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}): Review hardware requirements, sizing guidelines, and limitations. +- [Get started]({{< relref "/operate/kubernetes/flex/get-started" >}}): Configure Redis Flex on your cluster. +- [Scale your deployment]({{< relref "/operate/kubernetes/flex/scale" >}}): Learn scaling strategies and best practices. diff --git a/content/operate/kubernetes/flex/get-started.md b/content/operate/kubernetes/flex/get-started.md new file mode 100644 index 0000000000..1c7b52c0bf --- /dev/null +++ b/content/operate/kubernetes/flex/get-started.md @@ -0,0 +1,116 @@ +--- +title: Get started with Redis Flex on Kubernetes +alwaysopen: false +categories: +- docs +- operate +- kubernetes +description: Configure Redis Flex on your Redis Enterprise cluster for Kubernetes. +hideListLinks: true +linkTitle: Get started +weight: 20 +--- + +This guide shows you how to configure Redis Flex on your Redis Enterprise cluster for Kubernetes. + +## Prerequisites + +Before you begin, verify that you have: + +- Redis Enterprise for Kubernetes version 8.0.2-2 or later installed +- A running `RedisEnterpriseCluster` (REC) resource +- Locally attached NVMe SSDs on your worker nodes +- A StorageClass configured for Flash storage + +For hardware requirements and sizing guidelines, see [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}). + +## Configure the cluster for Redis Flex + +To enable Redis Flex, configure your `RedisEnterpriseCluster` (REC) resource with Flash storage settings. + +### Step 1: Create a StorageClass for Flash storage + +Create a StorageClass that references your locally attached SSDs. + +Key fields in the StorageClass: + +| Field | Description | +|---------------------|-----------------------------------------------------------| +| `provisioner` | Set to `kubernetes.io/no-provisioner` for local storage. | +| `volumeBindingMode` | Set to `WaitForFirstConsumer` for local volumes. | + +### Step 2: Configure Flash storage in the REC + +Add the `redisOnFlashSpec` section to your REC specification. + +Key fields in `redisOnFlashSpec`: + +| Field | Description | +|-------------------------|--------------------------------------------------| +| `enabled` | Set to `true` to enable Redis Flex. | +| `flashStorageClassName` | Name of the StorageClass for Flash storage. | +| `flashDiskSize` | Size of the Flash storage per node. | +| `storageEngine` | Storage engine. Set to `speedb` for Redis Flex. | + +### Step 3: Apply the configuration + +1. Apply the updated REC configuration: + + ```sh + kubectl apply -f rec.yaml + ``` + +2. Verify that the cluster is ready: + + ```sh + kubectl get rec + ``` + +## Create a Redis Flex database + +After you configure the cluster, create a `RedisEnterpriseDatabase` (REDB) resource with Redis Flex enabled. + +### Configure the REDB + +Create a database specification with `isRof` set to `true`. + +Key fields in the REDB: + +| Field | Description | +|--------------|--------------------------------------------------------| +| `memorySize` | Total database size (RAM + Flash). | +| `isRof` | Set to `true` to enable Redis Flex for this database. | +| `rofRamSize` | Amount of RAM allocated to the database. | + +### Apply the database configuration + +1. Apply the REDB: + + ```sh + kubectl apply -f redb.yaml + ``` + +2. Verify the database status: + + ```sh + kubectl get redb + ``` + +## Verify Redis Flex is active + +To confirm that Redis Flex is working: + +1. Check the database status: + + ```sh + kubectl get redb -o yaml + ``` + +2. Look for `isRof: true` in the status section. + +3. Connect to the database and verify that data operations work correctly. + +## Next steps + +- [Scale your deployment]({{< relref "/operate/kubernetes/flex/scale" >}}): Learn how to scale volume, throughput, and infrastructure. +- [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}): Review sizing guidelines and best practices. diff --git a/content/operate/kubernetes/flex/plan.md b/content/operate/kubernetes/flex/plan.md new file mode 100644 index 0000000000..f4b63daca0 --- /dev/null +++ b/content/operate/kubernetes/flex/plan.md @@ -0,0 +1,169 @@ +--- +title: Plan a Redis Flex deployment on Kubernetes +alwaysopen: false +categories: +- docs +- operate +- kubernetes +description: Hardware requirements, sizing guidelines, and limitations for Redis Flex on Kubernetes. +hideListLinks: true +linkTitle: Plan +weight: 10 +--- + +Review the hardware requirements, sizing guidelines, and known limitations before you deploy Redis Flex. + +## Version requirements + +Redis Flex requires: + +- Redis Enterprise for Kubernetes version 8.0.2-2 or later +- Redis version 8.0 or later + +{{}} +Redis 7.4 preview uses Auto Tiering regardless of cluster policy. Upgrade to Redis 8.0 or later to use Redis Flex. +{{}} + +## Hardware requirements + +### Flash storage requirements + +Your SSDs must meet these requirements: + +- **Locally attached** to worker nodes in your Kubernetes cluster. Network-attached storage (NAS), storage area networks (SAN), and cloud block storage (like AWS EBS) are not supported. +- **Dedicated** to Redis Flex. Don't share Flash storage with other database components like durability, binaries, or persistence. +- **Formatted and mounted** on the nodes that run Redis Enterprise pods. +- **Provisioned as local persistent volumes**. You can use a [local volume provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) for dynamic provisioning. +- **Configured with a StorageClass** resource with a unique name. + +For more information about storage configuration, see [Kubernetes local volumes](https://kubernetes.io/docs/concepts/storage/volumes/#local). + +### Flash capacity sizing + +Provision Flash capacity that exceeds your total database size. The extra space accounts for: + +- Write buffers +- Space amplification +- Operational overhead + +### Recommended SSD types + +For best performance, use NVMe SSDs: + +| SSD type | Recommendation | +|-----------------------|--------------------------------| +| NVMe Gen 5 or Gen 4 | Recommended | +| NVMe Gen 3 | Supported (lower performance) | + +## Sizing guidelines + +### Shard fundamentals + +Redis Flex databases consist of shards—independent data partitions that handle a portion of the dataset and request load. Each shard runs as a self-contained Redis process with dedicated memory, CPU, and Flash resources. + +### Recommended shard size + +Use these standard building blocks for capacity planning: + +- **50 GB per shard**: Standard capacity unit +- **1 vCPU per shard**: Baseline compute allocation + +For example, a 1 TB dataset requires 20 shards (20 × 50 GB). + +### RAM percentage impact on performance + +The RAM-to-Flash ratio directly affects throughput and latency: + +- More RAM: Higher throughput and lower latency +- Less RAM: Lower throughput, higher latency, and lower cost + +The following table shows expected performance per 50 GB shard with 1 vCPU: + +| RAM % | Throughput | Latency (p99) | +|-------|--------------|---------------| +| 10% | 5K ops/sec | ~10 ms | +| 20% | 10K ops/sec | ~6-8 ms | +| 30% | 15K ops/sec | ~5 ms | +| 40% | 20K ops/sec | ~3-4 ms | +| 50% | 25K ops/sec | <3 ms | + +{{}} +These figures assume uniform key distribution and a mixed read/write workload. Actual performance varies based on your data model, command mix, and network latency. +{{}} + +### Example: 1 TB deployment + +The following table shows aggregate throughput for a 1 TB dataset (20 shards) at different RAM percentages: + +| RAM % | Shards | vCPU total | Approx. throughput | +|-------|--------|------------|-------------------| +| 10% | 20 | 20 | 100K ops/sec | +| 20% | 20 | 20 | 200K ops/sec | +| 30% | 20 | 20 | 300K ops/sec | +| 40% | 20 | 20 | 400K ops/sec | +| 50% | 20 | 20 | 500K ops/sec | + +## Module compatibility + +### Supported + +Redis Flex supports: + +- All standard Redis data types +- Redis JSON +- Redis probabilistic data structures (Bloom filters, Count-Min Sketch, Top-K) + +### Not supported + +Redis Flex doesn't support: + +- Redis Query Engine (RQE) +- RedisTimeSeries +- Active-Active databases + +## Best practices + +### Key and value sizes + +- Store small keys and values when possible. Avoid objects larger than 10 KB. +- Large objects reduce performance because the entire value moves between RAM and Flash. +- Keys or values larger than 4 GB can't be stored in Flash and remain in RAM only. + +If you attempt to store oversized objects, warnings appear in the Redis logs: + +```text +WARNING: key too big for disk driver, size: 4703717276, key: subactinfo:htable +``` + +### Replication configuration + +Enable replication before populating the database with data. If you enable replication after the database is created, recovery can fail because required persistence files might be missing. + +### RAM population strategy (Redis 8.2+) + +Starting with Redis 8.2, Redis Flex uses utilization-aware RAM population: + +- Below 50% utilization: Uses up to 50% of configured RAM for hot data +- Above 50% utilization: Uses RAM and Flash proportionally based on the configured ratio + +This strategy delivers a stable performance curve across all utilization levels. + +## Known limitations + +{{}} +Redis Flex doesn't support Active-Active databases. +{{}} + +- **PVC expansion**: Not supported with `redisOnFlashSpec`. Don't enable `enablePersistentVolumeResize` in the REC `persistentSpec`. +- **Redis 7.4 preview**: Uses Auto Tiering regardless of cluster policy. +- **Maximum object size**: Keys or values larger than 4 GB remain in RAM only. +- **Flash storage**: Must be locally attached. Network storage isn't supported. + +### Deprecated fields + +The `flashStorageEngine` field is deprecated. Use `bigStoreDriver` instead. + +## Next steps + +- [Get started]({{< relref "/operate/kubernetes/flex/get-started" >}}): Configure Redis Flex on your cluster. +- [Scale your deployment]({{< relref "/operate/kubernetes/flex/scale" >}}): Learn scaling strategies. diff --git a/content/operate/kubernetes/flex/scale.md b/content/operate/kubernetes/flex/scale.md new file mode 100644 index 0000000000..715dc2e7bc --- /dev/null +++ b/content/operate/kubernetes/flex/scale.md @@ -0,0 +1,97 @@ +--- +title: Scale Redis Flex on Kubernetes +alwaysopen: false +categories: +- docs +- operate +- kubernetes +description: Scaling strategies and methods for Redis Flex deployments on Kubernetes. +hideListLinks: true +linkTitle: Scale +weight: 30 +--- + +This guide shows you how to scale Redis Flex databases on Kubernetes to meet changing workload demands. + +## Scaling dimensions + +Redis Flex supports three scaling dimensions: + +| Dimension | What it addresses | How to scale | +|----------------|-----------------------|-------------------------------------| +| Volume | Data size | Increase `memorySize` | +| Throughput | Operations per second | Adjust RAM percentage or add shards | +| Infrastructure | Node capacity | Add nodes to the cluster | + +## Before you scale + +Before you scale a Redis Flex deployment: + +1. Verify that your cluster has sufficient resources (CPU, memory, Flash storage). +2. For volume scaling, confirm that enough Flash capacity exists across nodes. +3. For infrastructure scaling, provision and add new nodes before you increase database size. + +## Scale volume (data size) + +To store more data, increase the database `memorySize` in your REDB specification. + +When you scale volume: + +- Adjust `rofRamSize` proportionally to maintain the same RAM percentage. +- Volume scaling can trigger shard redistribution. Monitor the database during this operation. + +## Scale throughput (operations per second) + +To increase throughput, use one of these options: + +### Option 1: Increase RAM percentage + +Allocate more RAM relative to total size by increasing `rofRamSize`. A higher RAM percentage keeps more data in fast memory, which improves throughput. + +See [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}) for details on how RAM percentage affects performance. + +### Option 2: Add shards + +Increase the number of shards by setting the `shardCount` field to distribute load. Each shard handles a portion of requests in parallel. + +## Scale infrastructure (cluster capacity) + +To add capacity to the underlying cluster: + +1. Update your `RedisEnterpriseCluster` resource to increase the `nodes` count. +2. Apply the configuration: + + ```sh + kubectl apply -f rec.yaml + ``` + +3. Wait for all new pods to reach `Running` status before you scale databases. + +## Scaling decision table + +Use this table to determine the best scaling approach: + +| Goal | Recommended action | +|----------------------|--------------------------------------| +| Store more data | Increase `memorySize` | +| Improve latency | Increase `rofRamSize` (higher RAM %) | +| Handle more ops/sec | Add shards or increase RAM % | +| Add cluster capacity | Add nodes to the REC | + +## Scaling best practices + +- **Scale incrementally**: Make gradual changes and monitor performance. +- **Pre-provision infrastructure**: Add cluster nodes before you scale databases. +- **Monitor during scaling**: Watch for increased latency or errors during operations. +- **Test scaling procedures**: Verify scaling in a non-production environment first. + +## Known limitations + +- **PVC expansion**: Not supported with `redisOnFlashSpec`. Plan Flash storage capacity upfront. +- **Scaling down**: Reduce database size gradually to avoid data loss. +- **Active-Active**: Redis Flex doesn't support Active-Active databases. + +## Next steps + +- [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}): Review sizing guidelines for capacity planning. +- [Redis Flex overview]({{< relref "/operate/kubernetes/flex" >}}): Learn how Redis Flex manages data across RAM and Flash. From 188d17643d8de4a0047cbff03dfdd4d04dfa1cac Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 15:01:57 -0600 Subject: [PATCH 02/11] index page edits --- content/operate/kubernetes/flex/_index.md | 74 +++++++++++------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index 7bd7458028..0f05bd0a99 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -1,83 +1,79 @@ --- -title: Redis Flex on Kubernetes +title: Flex on Kubernetes alwaysopen: false categories: - docs - operate - kubernetes -description: Extend Redis databases with Flash storage for large-scale, cost-efficient deployments on Kubernetes. +description: Extend Redis databases with flash storage for large-scale, cost-efficient deployments on Kubernetes. hideListLinks: true -linkTitle: Redis Flex +linkTitle: Flex weight: 41 --- -Redis Flex extends your database capacity by combining RAM and Flash (SSD) storage. This tiered architecture keeps frequently accessed (hot) data in RAM for sub-millisecond latency while storing less active (warm) data on Flash to reduce costs and increase capacity. +Flex extends your database capacity by combining RAM and flash (SSD) storage. This tiered architecture keeps frequently accessed (hot) data in RAM for sub-millisecond latency while storing less active (warm) data on flash to reduce costs and increase capacity. -Redis Flex databases work with your existing Redis applications and the Redis API without modification. +Flex databases work with your existing Redis applications and the Redis API without modification. -## How Redis Flex works +## How Flex works ### Automatic data tiering -Redis Flex moves data between RAM and Flash based on access patterns: +Flex moves data between RAM and flash based on access patterns: - Frequently accessed data stays in high-speed RAM. -- Less active data moves to cost-efficient Flash storage. -- Data accessed from Flash promotes back to RAM automatically. +- Less active data moves to cost-efficient flash storage. +- Data accessed from flash promotes back to RAM automatically. -Redis uses an LRU (least recently used) eviction policy to manage data placement. When memory pressure increases, Redis Flex identifies cold objects, transfers them to Flash, and frees RAM for new or frequently accessed keys. +Redis uses an [LRU (least recently used)]({{< relref "/develop/reference/eviction#apx-lru" >}}) eviction policy to manage data placement. When memory pressure increases, Flex identifies cold objects, transfers them to flash, and frees RAM for new or frequently accessed keys. This process requires no application changes. Your existing Redis commands work across both storage tiers. ### Storage engine -Redis Flex uses Speedb, a high-performance key-value storage engine optimized for Flash drives: +Flex uses Speedb, a high-performance key-value storage engine optimized for flash drives: - Redis handles all data operations in memory. -- Speedb manages the Flash storage layer. +- Speedb manages the flash storage layer. - This design delivers predictable latency and throughput as datasets grow beyond RAM limits. -### Key and value offloading (Redis 8.2+) +## When to use Flex -Starting with Redis 8.2, Redis Flex offloads both keys and values to Flash: - -| Redis version | What moves to Flash | -|---------------|----------------------------------| -| Before 8.2 | Values only (keys remain in RAM) | -| 8.2 and later | Both keys and values | - -This capability increases dataset density per node and reduces RAM consumption. - -## When to use Redis Flex - -Use Redis Flex when you need to: +Use Flex when you need to: - Run Redis at terabyte scale while maintaining high throughput and sub-10 ms latency -- Power real-time feature stores for machine learning applications like fraud detection, recommendation systems, and personalization engines -- Operate large distributed caches that require elastic scaling and consistent performance under heavy load -- Reduce infrastructure costs by combining high-speed RAM with cost-efficient Flash storage - -## What Redis Flex is not +- Power real-time feature stores for machine learning applications +- Operate large distributed caches with elastic scaling and consistent performance under heavy load +- Reduce infrastructure costs by combining high-speed RAM with cost-efficient flash storage -Redis Flex optimizes for performance, elasticity, and scalability—not long-term data persistence. +Flex does not replace long-term data persistence. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like AOF (Append-Only File), RDB snapshots, or both. For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). -Although Redis Flex retains data in memory or Flash during operation, don't use it as a primary system of record or persistent storage layer. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like AOF (Append-Only File), RDB snapshots, or both. +## Flex and Auto Tiering -For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). - -## Redis Flex and Auto Tiering - -Redis Flex replaces Auto Tiering. The Redis Enterprise operator selects the appropriate implementation based on your Redis version: +Flex replaces [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}) (formerly known as Redis on Flash). Redis Enterprise selects the implementation based on your Redis version: | Kubernetes operator version | Implementation | |-----------------------------|----------------| -| 8.0.2-2 and later | Redis Flex | +| 8.0.2-2 and later | Flex | | 7.22.2-22 and earlier | Auto Tiering | For Redis Enterprise for Kubernetes version 7.22.2-22 or earlier, see [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}). +### Differences between Flex and Auto Tiering + +- Key and value offloading + - Auto Tiering offloads only values to flash while keys remain in RAM. + - Flex offloads both keys and values, which increases dataset density per node and reduces RAM consumption. +- RAM population strategy + - Auto Tiering fills all available RAM before offloading data to flash. This maximizes hot-data performance but can cause non-linear performance changes at high utilization. + - Flex uses utilization-aware RAM population. + When database utilization is below 50%, Flex uses up to 50% of configured RAM for hot data. Above 50% utilization, Flex uses both RAM and flash proportionally, following the configured RAM-to-flash ratio. This provides a stable performance curve, consistent RAM hit-rate, and predictable throughput and latency. +- Storage engine + - Auto Tiering uses either RocksDB or Speedb as the storage engine. + - Flex uses Speedb only. + ## Next steps - [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}): Review hardware requirements, sizing guidelines, and limitations. -- [Get started]({{< relref "/operate/kubernetes/flex/get-started" >}}): Configure Redis Flex on your cluster. +- [Get started]({{< relref "/operate/kubernetes/flex/get-started" >}}): Configure Flex on your cluster. - [Scale your deployment]({{< relref "/operate/kubernetes/flex/scale" >}}): Learn scaling strategies and best practices. From d31eb1786901a61201485049f56f445ec8dbbb8c Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 15:04:38 -0600 Subject: [PATCH 03/11] small format edit --- content/operate/kubernetes/flex/_index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index 0f05bd0a99..c60ec7f92b 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -35,7 +35,8 @@ Flex uses Speedb, a high-performance key-value storage engine optimized for flas - Redis handles all data operations in memory. - Speedb manages the flash storage layer. -- This design delivers predictable latency and throughput as datasets grow beyond RAM limits. + +This design delivers predictable latency and throughput as datasets grow beyond RAM limits. ## When to use Flex From 1189a9269009580cc210fe27a3a8b22fa0bc9098 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 15:16:58 -0600 Subject: [PATCH 04/11] add compatibility --- content/operate/kubernetes/flex/_index.md | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index c60ec7f92b..d50299764a 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -31,13 +31,23 @@ This process requires no application changes. Your existing Redis commands work ### Storage engine -Flex uses Speedb, a high-performance key-value storage engine optimized for flash drives: +Flex uses [Speedb](https://docs.speedb.io), a high-performance key-value storage engine optimized for flash drives: - Redis handles all data operations in memory. - Speedb manages the flash storage layer. This design delivers predictable latency and throughput as datasets grow beyond RAM limits. +## Compatibility + +Flex is compatible with the Redis API and supports all Redis data types, including JSON and probabilistic data structures (Bloom filters, Count-Min Sketch, Top-K). + +The following features are not yet supported with Flex: + +- Redis Query Engine (RQE) +- Time series +- Active-Active + ## When to use Flex Use Flex when you need to: @@ -47,7 +57,7 @@ Use Flex when you need to: - Operate large distributed caches with elastic scaling and consistent performance under heavy load - Reduce infrastructure costs by combining high-speed RAM with cost-efficient flash storage -Flex does not replace long-term data persistence. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like AOF (Append-Only File), RDB snapshots, or both. For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). +{{}}Flex does not replace long-term data persistence. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like [AOF (Append-Only File)]({{< relref "/operate/oss_and_stack/management/persistence#append-only-file" >}}), [RDB snapshots]({{< relref "/operate/oss_and_stack/management/persistence#snapshotting" >}}), or both. For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). ## Flex and Auto Tiering @@ -63,15 +73,14 @@ For Redis Enterprise for Kubernetes version 7.22.2-22 or earlier, see [Auto Tier ### Differences between Flex and Auto Tiering - Key and value offloading - - Auto Tiering offloads only values to flash while keys remain in RAM. - - Flex offloads both keys and values, which increases dataset density per node and reduces RAM consumption. + - Auto Tiering offloads only values to flash while keys remain in RAM. + - Flex offloads both keys and values, which increases dataset density per node and reduces RAM consumption. - RAM population strategy - - Auto Tiering fills all available RAM before offloading data to flash. This maximizes hot-data performance but can cause non-linear performance changes at high utilization. - - Flex uses utilization-aware RAM population. - When database utilization is below 50%, Flex uses up to 50% of configured RAM for hot data. Above 50% utilization, Flex uses both RAM and flash proportionally, following the configured RAM-to-flash ratio. This provides a stable performance curve, consistent RAM hit-rate, and predictable throughput and latency. + - Auto Tiering fills all available RAM before offloading data to flash. This maximizes hot-data performance but can cause non-linear performance changes at high utilization. + - Flex uses utilization-aware RAM population. When database utilization is below 50%, Flex uses up to 50% of configured RAM for hot data. Above 50% utilization, Flex uses both RAM and flash proportionally, following the configured RAM-to-flash ratio. This provides a stable performance curve, consistent RAM hit-rate, and predictable throughput and latency. - Storage engine - - Auto Tiering uses either RocksDB or Speedb as the storage engine. - - Flex uses Speedb only. + - Auto Tiering uses either RocksDB or Speedb as the storage engine. + - Flex uses Speedb only. ## Next steps From 99ae1cfca8d9a549d9d0667b9108cc6342ac4251 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 15:30:16 -0600 Subject: [PATCH 05/11] utilization aware RAM --- content/operate/kubernetes/flex/_index.md | 26 ++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index d50299764a..bd0026a750 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -29,6 +29,21 @@ Redis uses an [LRU (least recently used)]({{< relref "/develop/reference/evictio This process requires no application changes. Your existing Redis commands work across both storage tiers. +### Utilization-aware RAM population + +Flex uses a hybrid memory model that balances performance with predictable behavior as the dataset grows. The goal is to maximize hot data in RAM while maintaining stable performance across all utilization levels. + +Flex considers both the configured RAM percentage and current dataset utilization: + +- When database utilization is below 50%, Flex uses up to 50% of configured RAM for hot data. +- Above 50% utilization, Flex uses both RAM and flash proportionally, following the configured RAM-to-flash ratio. + +This ensures: + +- A stable performance curve across all utilization levels +- No sudden drop-off in RAM hit-rate as the database fills +- Predictable throughput and latency, especially for large deployments + ### Storage engine Flex uses [Speedb](https://docs.speedb.io), a high-performance key-value storage engine optimized for flash drives: @@ -75,12 +90,21 @@ For Redis Enterprise for Kubernetes version 7.22.2-22 or earlier, see [Auto Tier - Key and value offloading - Auto Tiering offloads only values to flash while keys remain in RAM. - Flex offloads both keys and values, which increases dataset density per node and reduces RAM consumption. +- RAM requirements + - Auto Tiering requires enough RAM to hold all keys. + - Flex has no requirement to keep keys in RAM. Minimum RAM is based on performance goals, not key count. The minimum RAM-to-flash ratio is 10%, which enables high flash utilization without compromising architecture. - RAM population strategy - Auto Tiering fills all available RAM before offloading data to flash. This maximizes hot-data performance but can cause non-linear performance changes at high utilization. - - Flex uses utilization-aware RAM population. When database utilization is below 50%, Flex uses up to 50% of configured RAM for hot data. Above 50% utilization, Flex uses both RAM and flash proportionally, following the configured RAM-to-flash ratio. This provides a stable performance curve, consistent RAM hit-rate, and predictable throughput and latency. + - Flex uses utilization-aware RAM population. - Storage engine - Auto Tiering uses either RocksDB or Speedb as the storage engine. - Flex uses Speedb only. +- Hot data caching and dataset size + - Auto Tiering is limited by key memory overhead, which restricts maximum dataset size. + - Flex is more efficient because RAM holds hot keys and values, supporting larger datasets. +- Performance consistency + - Auto Tiering depends on RAM pressure and key count. + - Flex provides higher RAM hit-rate and more stable latency. ## Next steps From ee15531feb7b57354f634118b847bd1a3dc0619a Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 16:01:43 -0600 Subject: [PATCH 06/11] database verison table --- content/operate/kubernetes/flex/_index.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index bd0026a750..8ce281c90f 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -76,12 +76,13 @@ Use Flex when you need to: ## Flex and Auto Tiering -Flex replaces [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}) (formerly known as Redis on Flash). Redis Enterprise selects the implementation based on your Redis version: +Flex replaces [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}) (formerly known as Redis on Flash). Redis Enterprise selects the implementation based on your database version: -| Kubernetes operator version | Implementation | -|-----------------------------|----------------| -| 8.0.2-2 and later | Flex | -| 7.22.2-22 and earlier | Auto Tiering | +| Redis database version | Operator version | Redis Flex | Auto Tiering | +|------------------------|------------------|------------|--------------| +| 8.0 and later | 8.0.2-2 and later | | | +| 7.4 | 7.8.2-6 and later | | | +| 7.2 and earlier | 7.22.2-22 and earlier | | | For Redis Enterprise for Kubernetes version 7.22.2-22 or earlier, see [Auto Tiering]({{< relref "/operate/kubernetes/7.22/re-clusters/auto-tiering" >}}). From a1ef947075f279b72c6ab93c4488469202956b72 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Fri, 6 Mar 2026 16:13:10 -0600 Subject: [PATCH 07/11] fix build failure --- content/operate/kubernetes/flex/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/operate/kubernetes/flex/_index.md b/content/operate/kubernetes/flex/_index.md index 8ce281c90f..5a9aa37b1b 100644 --- a/content/operate/kubernetes/flex/_index.md +++ b/content/operate/kubernetes/flex/_index.md @@ -72,7 +72,7 @@ Use Flex when you need to: - Operate large distributed caches with elastic scaling and consistent performance under heavy load - Reduce infrastructure costs by combining high-speed RAM with cost-efficient flash storage -{{}}Flex does not replace long-term data persistence. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like [AOF (Append-Only File)]({{< relref "/operate/oss_and_stack/management/persistence#append-only-file" >}}), [RDB snapshots]({{< relref "/operate/oss_and_stack/management/persistence#snapshotting" >}}), or both. For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}). +{{}}Flex does not replace long-term data persistence. For workloads that require durability and recovery across restarts or failures, use Redis persistence features like [AOF (Append-Only File)]({{< relref "/operate/oss_and_stack/management/persistence#append-only-file" >}}), [RDB snapshots]({{< relref "/operate/oss_and_stack/management/persistence#snapshotting" >}}), or both. For more information, see [Database persistence]({{< relref "/operate/rs/databases/configure/database-persistence" >}}).{{}} ## Flex and Auto Tiering From 8f52144112d54f5a9dbd9f29ddf8537351c73ac9 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Thu, 12 Mar 2026 14:10:27 -0500 Subject: [PATCH 08/11] plan page edits --- content/operate/kubernetes/flex/plan.md | 73 ++++--------------------- 1 file changed, 10 insertions(+), 63 deletions(-) diff --git a/content/operate/kubernetes/flex/plan.md b/content/operate/kubernetes/flex/plan.md index f4b63daca0..6e407d2bac 100644 --- a/content/operate/kubernetes/flex/plan.md +++ b/content/operate/kubernetes/flex/plan.md @@ -18,11 +18,7 @@ Review the hardware requirements, sizing guidelines, and known limitations befor Redis Flex requires: - Redis Enterprise for Kubernetes version 8.0.2-2 or later -- Redis version 8.0 or later - -{{}} -Redis 7.4 preview uses Auto Tiering regardless of cluster policy. Upgrade to Redis 8.0 or later to use Redis Flex. -{{}} +- Redis database version 8.2 or later ## Hardware requirements @@ -70,39 +66,13 @@ Use these standard building blocks for capacity planning: For example, a 1 TB dataset requires 20 shards (20 × 50 GB). -### RAM percentage impact on performance +### RAM-to-flash ratio -The RAM-to-Flash ratio directly affects throughput and latency: +The RAM-to-flash ratio directly affects throughput and latency: - More RAM: Higher throughput and lower latency - Less RAM: Lower throughput, higher latency, and lower cost -The following table shows expected performance per 50 GB shard with 1 vCPU: - -| RAM % | Throughput | Latency (p99) | -|-------|--------------|---------------| -| 10% | 5K ops/sec | ~10 ms | -| 20% | 10K ops/sec | ~6-8 ms | -| 30% | 15K ops/sec | ~5 ms | -| 40% | 20K ops/sec | ~3-4 ms | -| 50% | 25K ops/sec | <3 ms | - -{{}} -These figures assume uniform key distribution and a mixed read/write workload. Actual performance varies based on your data model, command mix, and network latency. -{{}} - -### Example: 1 TB deployment - -The following table shows aggregate throughput for a 1 TB dataset (20 shards) at different RAM percentages: - -| RAM % | Shards | vCPU total | Approx. throughput | -|-------|--------|------------|-------------------| -| 10% | 20 | 20 | 100K ops/sec | -| 20% | 20 | 20 | 200K ops/sec | -| 30% | 20 | 20 | 300K ops/sec | -| 40% | 20 | 20 | 400K ops/sec | -| 50% | 20 | 20 | 500K ops/sec | - ## Module compatibility ### Supported @@ -123,41 +93,18 @@ Redis Flex doesn't support: ## Best practices -### Key and value sizes - -- Store small keys and values when possible. Avoid objects larger than 10 KB. -- Large objects reduce performance because the entire value moves between RAM and Flash. -- Keys or values larger than 4 GB can't be stored in Flash and remain in RAM only. - -If you attempt to store oversized objects, warnings appear in the Redis logs: - -```text -WARNING: key too big for disk driver, size: 4703717276, key: subactinfo:htable -``` - -### Replication configuration - -Enable replication before populating the database with data. If you enable replication after the database is created, recovery can fail because required persistence files might be missing. - -### RAM population strategy (Redis 8.2+) - -Starting with Redis 8.2, Redis Flex uses utilization-aware RAM population: - -- Below 50% utilization: Uses up to 50% of configured RAM for hot data -- Above 50% utilization: Uses RAM and Flash proportionally based on the configured ratio - -This strategy delivers a stable performance curve across all utilization levels. +- Store small keys and values (under 10 KB) when possible. Large objects reduce performance, and objects larger than 4 GB can't be stored in Flash. +- Enable replication before populating the database with data. If you enable replication after the database is created, recovery can fail because required persistence files might be missing. +- Increase RAM percentage if 99th-percentile latency exceeds your target or cache hit rates drop. +- Decrease RAM percentage if memory utilization is high but latency remains stable to lower cost and improve efficiency. +- Re-evaluate the ratio of RAM to Flash periodically as dataset size and access patterns evolve. ## Known limitations -{{}} -Redis Flex doesn't support Active-Active databases. -{{}} - +- **Flash storage**: Must be locally attached. Network storage isn't supported. +- **Active-Active**: Not supported with Flex. - **PVC expansion**: Not supported with `redisOnFlashSpec`. Don't enable `enablePersistentVolumeResize` in the REC `persistentSpec`. -- **Redis 7.4 preview**: Uses Auto Tiering regardless of cluster policy. - **Maximum object size**: Keys or values larger than 4 GB remain in RAM only. -- **Flash storage**: Must be locally attached. Network storage isn't supported. ### Deprecated fields From 9abb0e5522c58c355ccc7e6dd72ad458a452e0f2 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Thu, 12 Mar 2026 14:19:28 -0500 Subject: [PATCH 09/11] edit scaling page --- content/operate/kubernetes/flex/scale.md | 151 +++++++++++++++-------- 1 file changed, 100 insertions(+), 51 deletions(-) diff --git a/content/operate/kubernetes/flex/scale.md b/content/operate/kubernetes/flex/scale.md index 715dc2e7bc..1dbeaf2b47 100644 --- a/content/operate/kubernetes/flex/scale.md +++ b/content/operate/kubernetes/flex/scale.md @@ -11,87 +11,136 @@ linkTitle: Scale weight: 30 --- -This guide shows you how to scale Redis Flex databases on Kubernetes to meet changing workload demands. +This guide shows you how to scale Flex databases on Kubernetes to meet changing workload demands. -## Scaling dimensions +## Choose a scaling strategy -Redis Flex supports three scaling dimensions: +Use the following table to determine the best scaling strategy for your Flex deployment: -| Dimension | What it addresses | How to scale | -|----------------|-----------------------|-------------------------------------| -| Volume | Data size | Increase `memorySize` | -| Throughput | Operations per second | Adjust RAM percentage or add shards | -| Infrastructure | Node capacity | Add nodes to the cluster | +| Goal | Recommended action | +|------|--------------------| +| Increase data capacity only without adding CPU | Increase `memorySize` and decrease RAM percentage | +| Increase throughput only | Add shards and vCPU | +| Increase data capacity and throughput | Add shards | +| Improve latency under higher load | Increase RAM percentage | +| Reduce cost while maintaining performance | Tune RAM-to-flash ratio | -## Before you scale +## Prerequisites -Before you scale a Redis Flex deployment: +Before you scale a Flex deployment, verify that your cluster has sufficient resources, such as memory, disk, and vCPU. -1. Verify that your cluster has sufficient resources (CPU, memory, Flash storage). -2. For volume scaling, confirm that enough Flash capacity exists across nodes. -3. For infrastructure scaling, provision and add new nodes before you increase database size. +## Scale volume -## Scale volume (data size) +If your dataset requires more capacity while maintaining performance, you can prepare a Flex database to store more data using one of the following options: -To store more data, increase the database `memorySize` in your REDB specification. +1. Increase `memorySize` and [add shards](#add-shards). -When you scale volume: +1. Increase `memorySize` and [decrease the RAM-to-flash ratio](#decrease-ram-to-flash-ratio). -- Adjust `rofRamSize` proportionally to maintain the same RAM percentage. -- Volume scaling can trigger shard redistribution. Monitor the database during this operation. +### Add shards -## Scale throughput (operations per second) +You can add more shards to expand dataset capacity while maintaining the existing RAM-to-flash ratio. Throughput capacity also typically increases as a result of additional shards and infrastructure. This strategy is recommended when the dataset size and traffic are expected to grow together. -To increase throughput, use one of these options: +Before you increase the dataset capacity and add shards, you need to add more RAM and vCPUs to handle the increased number of shards. -### Option 1: Increase RAM percentage +To increase the dataset capacity and shards: -Allocate more RAM relative to total size by increasing `rofRamSize`. A higher RAM percentage keeps more data in fast memory, which improves throughput. +1. Edit your REDB custom resource: -See [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}) for details on how RAM percentage affects performance. + ```sh + kubectl edit redb + ``` + +1. Increase `memorySize` in the `spec` section. + +1. Increase `shardCount` in the `spec` section. + +1. Save and close the file. + +### Decrease RAM-to-flash ratio + +You can allocate more data to the flash tier to increase the database capacity while keeping the same amount of RAM, shards, and vCPU. This strategy is recommended when scaling for volume only and SSD resources are underutilized. + +To increase the dataset capacity and decrease the RAM-to-flash ratio: + +1. Edit your REDB custom resource: + + ```sh + kubectl edit redb + ``` + +1. Increase `memorySize` in the `spec` section. + +1. Decrease `rofRamSize` in the `redisOnFlashSpec` section. + +1. Save and close the file. + +## Scale throughput -### Option 2: Add shards +If your workload's read/write rate increases and latency starts to rise, you can prepare the database to handle more traffic using one of the following strategies: -Increase the number of shards by setting the `shardCount` field to distribute load. Each shard handles a portion of requests in parallel. +1. [Add shards or nodes](#add-shards-or-nodes). -## Scale infrastructure (cluster capacity) +1. [Increase the RAM-to-flash ratio](#increase-ram-to-flash-ratio). -To add capacity to the underlying cluster: +### Add shards or nodes -1. Update your `RedisEnterpriseCluster` resource to increase the `nodes` count. -2. Apply the configuration: +You can add more shards or nodes to distribute traffic and increase throughput without changing the RAM-to-flash ratio. Dataset size capacity also typically increases as a result of additional shards and infrastructure. This strategy is recommended when the dataset size and traffic are expected to grow together. + +Before you add shards or nodes, you need to add more RAM and vCPUs to handle the increased number of shards or nodes. + +To add shards: + +1. Edit your REDB custom resource: + + ```sh + kubectl edit redb + ``` + +1. Increase `shardCount` in the `spec` section. + +1. Save and close the file. + +To add nodes to the cluster, increase the `nodes` count in your RedisEnterpriseCluster (REC) custom resource: + +```sh +kubectl edit rec +``` + +### Increase RAM-to-flash ratio + +To improve throughput and lower latency, you can expand the in-memory tier to serve a higher proportion of requests directly from RAM. This strategy is recommended when low latency is your primary goal and you don't need to increase the dataset size. + +Before increasing the RAM-to-flash ratio, you might need to add more nodes to accommodate additional RAM. + +To increase the RAM-to-flash ratio: + +1. Edit your REDB custom resource: ```sh - kubectl apply -f rec.yaml + kubectl edit redb ``` -3. Wait for all new pods to reach `Running` status before you scale databases. +1. Increase `rofRamSize` in the `redisOnFlashSpec` section. + +1. Save and close the file. -## Scaling decision table +## Scale infrastructure -Use this table to determine the best scaling approach: +You can increase or adjust the underlying resources supporting the database, such as CPU, memory, and disk. -| Goal | Recommended action | -|----------------------|--------------------------------------| -| Store more data | Increase `memorySize` | -| Improve latency | Increase `rofRamSize` (higher RAM %) | -| Handle more ops/sec | Add shards or increase RAM % | -| Add cluster capacity | Add nodes to the REC | +For Flex deployments on Kubernetes, ensure the cluster has sufficient physical resources before scaling. The cluster requires: -## Scaling best practices +- Enough RAM to support the desired in-memory dataset size. -- **Scale incrementally**: Make gradual changes and monitor performance. -- **Pre-provision infrastructure**: Add cluster nodes before you scale databases. -- **Monitor during scaling**: Watch for increased latency or errors during operations. -- **Test scaling procedures**: Verify scaling in a non-production environment first. +- Enough SSD capacity for flash-tier data. -## Known limitations +- Adequate vCPU to support increased shard count or throughput. -- **PVC expansion**: Not supported with `redisOnFlashSpec`. Plan Flash storage capacity upfront. -- **Scaling down**: Reduce database size gradually to avoid data loss. -- **Active-Active**: Redis Flex doesn't support Active-Active databases. +{{}} +Scaling operations will fail or underperform if the underlying cluster is resource-constrained. +{{}} -## Next steps +PVC expansion is not supported with `redisOnFlashSpec`. Plan flash storage capacity upfront and don't enable `enablePersistentVolumeResize` in the REC `persistentSpec`. -- [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}): Review sizing guidelines for capacity planning. -- [Redis Flex overview]({{< relref "/operate/kubernetes/flex" >}}): Learn how Redis Flex manages data across RAM and Flash. +See Flex [hardware requirements]({{}}) for more information. From b660e224f9321109c451f569df3916db9615d4c9 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Thu, 12 Mar 2026 14:35:02 -0500 Subject: [PATCH 10/11] add auto tiering and edit get started --- .../operate/kubernetes/flex/auto-tiering.md | 93 ++++++++++++++++ .../operate/kubernetes/flex/get-started.md | 101 +++++++++++------- 2 files changed, 153 insertions(+), 41 deletions(-) create mode 100644 content/operate/kubernetes/flex/auto-tiering.md diff --git a/content/operate/kubernetes/flex/auto-tiering.md b/content/operate/kubernetes/flex/auto-tiering.md new file mode 100644 index 0000000000..6052c25896 --- /dev/null +++ b/content/operate/kubernetes/flex/auto-tiering.md @@ -0,0 +1,93 @@ +--- +Title: Use Auto Tiering on Kubernetes +alwaysopen: false +categories: +- docs +- operate +- kubernetes +description: Deploy a cluster with Auto Tiering on Kubernetes. +linkTitle: Auto Tiering +weight: 40 +--- + +{{}} +This page applies to Redis database version 7.4 and earlier. If you use version 8.0 or later, see [Redis Flex](https://redis.io/docs/latest/operate/kubernetes/re-clusters/redis-flex). +{{}} + +## Prerequisites + +Redis Enterprise Software for Kubernetes supports using Auto Tiering (previously known as Redis on Flash), which extends your node memory to use both RAM and flash storage. SSDs (solid state drives) can store infrequently used (warm) values while your keys and frequently used (hot) values are still stored in RAM. This improves performance and lowers costs for large datasets. + +{{}} +NVMe (non-volatile memory express) SSDs are strongly recommended to achieve the best performance. +{{}} + +Before creating your Redis clusters or databases, these SSDs must be: + +- [locally attached to worker nodes in your Kubernetes cluster](https://kubernetes.io/docs/concepts/storage/volumes/#local) +- formatted and mounted on the nodes that will run Redis Enterprise pods +- dedicated to Auto Tiering and not shared with other parts of the database, (e.g. durability, binaries) +- [provisioned as local persistent volumes](https://kubernetes.io/docs/concepts/storage/volumes/#local) + - You can use a [local volume provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/master/README.md) to do this [dynamically](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic) +- a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/#local) resource with a unique name + +For more information on node storage, see [Node persistent and ephemeral storage]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}). + +## Create a Redis Enterprise cluster + +To deploy a Redis Enterprise cluster (REC) with Auto Tiering, you'll need to specify the following in the `redisOnFlashSpec` section of your [REC custom resource]({{< relref "/operate/kubernetes/7.22/reference/api/redis_enterprise_cluster_api" >}}): + +- enable Auto Tiering (`enabled: true`) +- flash storage driver (`bigStoreDriver`) + - `rocksdb` or `speedb`(default) +- storage class name (`storageClassName`) +- minimal flash disk size (`flashDiskSize`) + +{{}} Clusters upgraded to version 7.2.4-2 from an earlier version will change the `bigStoreDriver` (previously called `flashStorageEngine`) to the new default `speedb`, regardless of previous configuration. {{}} + +{{}}Switching between storage engines (`speedb` and `rocksdb`) requires guidance by Redis Support or your Account Manager.{{}} + +{{}}PVC expansion is not supported when using Auto Tiering. Do not enable `enablePersistentVolumeResize` in the REC `persistentSpec` if you are using `redisOnFlashSpec` as this will result in conflicts. {{}} + +Here is an example of an REC custom resource with these attributes: + +```YAML +apiVersion: app.redislabs.com/v1 +kind: RedisEnterpriseCluster +metadata: + name: "rec" +spec: + + nodes: 3 + redisOnFlashSpec: + enabled: true + bigStoreDriver: speedb + storageClassName: local-scsi + flashDiskSize: 100G +``` + +### Create a Redis Enterprise database + +By default, any new database will use RAM only. To create a Redis Enterprise database (REDB) that can use flash storage, specify the following in the `redisEnterpriseCluster` section of the REDB custom resource definition: + +- `isRof: true` enables Auto Tiering +- `rofRamSize` defines the RAM capacity for the database + +Below is an example REDB custom resource: + +```YAML +apiVersion: app.redislabs.com/v1alpha1 +kind: RedisEnterpriseDatabase +metadata: + name: autoteiring-redb +spec: + redisEnterpriseCluster: + name: rec + isRof: true + memorySize: 2GB + rofRamSize: 0.5GB +``` + +{{< note >}} +This example defines both `memorySize` and `rofRamSize`. When using Auto Tiering, `memorySize` refers to the total combined memory size (RAM + flash) allocated for the database. `rofRamSize` specifies only the RAM capacity for the database. `rofRamSize` must be at least 10% of `memorySize`. +{{< /note >}} diff --git a/content/operate/kubernetes/flex/get-started.md b/content/operate/kubernetes/flex/get-started.md index 1c7b52c0bf..73ca14f51f 100644 --- a/content/operate/kubernetes/flex/get-started.md +++ b/content/operate/kubernetes/flex/get-started.md @@ -1,17 +1,21 @@ --- -title: Get started with Redis Flex on Kubernetes +title: Get started with Flex on Kubernetes alwaysopen: false categories: - docs - operate - kubernetes -description: Configure Redis Flex on your Redis Enterprise cluster for Kubernetes. +description: Configure Flex on your Redis Enterprise cluster for Kubernetes. hideListLinks: true linkTitle: Get started weight: 20 --- -This guide shows you how to configure Redis Flex on your Redis Enterprise cluster for Kubernetes. +{{}} +This page applies to Redis database version 7.4 and earlier using Auto Tiering. If you use version 8.0 or later, see [Redis Flex](https://redis.io/docs/latest/operate/kubernetes/flex/). +{{}} + +Flex extends your database capacity by combining RAM and flash (SSD) storage. This tiered architecture keeps frequently accessed (hot) data in RAM for sub-millisecond latency while storing less active (warm) data on flash to reduce costs and increase capacity. ## Prerequisites @@ -19,70 +23,85 @@ Before you begin, verify that you have: - Redis Enterprise for Kubernetes version 8.0.2-2 or later installed - A running `RedisEnterpriseCluster` (REC) resource +- Redis database version 7.4 or later - Locally attached NVMe SSDs on your worker nodes -- A StorageClass configured for Flash storage +- A StorageClass configured for flash storage with a unique name For hardware requirements and sizing guidelines, see [Plan your deployment]({{< relref "/operate/kubernetes/flex/plan" >}}). -## Configure the cluster for Redis Flex - -To enable Redis Flex, configure your `RedisEnterpriseCluster` (REC) resource with Flash storage settings. - -### Step 1: Create a StorageClass for Flash storage - -Create a StorageClass that references your locally attached SSDs. - -Key fields in the StorageClass: - -| Field | Description | -|---------------------|-----------------------------------------------------------| -| `provisioner` | Set to `kubernetes.io/no-provisioner` for local storage. | -| `volumeBindingMode` | Set to `WaitForFirstConsumer` for local volumes. | - -### Step 2: Configure Flash storage in the REC +## Configure the REC for Flex -Add the `redisOnFlashSpec` section to your REC specification. +To enable Flex, configure your `RedisEnterpriseCluster` (REC) resource with flash storage settings. Add the [`redisOnFlashSpec`]({{}}) section to your REC specification. Key fields in `redisOnFlashSpec`: | Field | Description | |-------------------------|--------------------------------------------------| -| `enabled` | Set to `true` to enable Redis Flex. | -| `flashStorageClassName` | Name of the StorageClass for Flash storage. | -| `flashDiskSize` | Size of the Flash storage per node. | -| `storageEngine` | Storage engine. Set to `speedb` for Redis Flex. | - -### Step 3: Apply the configuration +| `enabled` | Set to `true` to enable Flex. | +| `flashStorageClassName` | Name of the StorageClass for flash storage. | +| `flashDiskSize` | Size of the flash storage per node. | +| `storageEngine` | Storage engine. Set to `speedb` for Flex. | + +For all available fields, see the [REC API reference]({{}}). + +{{}} +PVC expansion is not supported when using Flex. Do not enable `enablePersistentVolumeResize` in the REC `persistentSpec` if you are using `redisOnFlashSpec` as this will result in conflicts. +{{}} + +1. Create a REC specification file with flash storage settings similar to the following example: + + ```yaml + apiVersion: app.redislabs.com/v1 + kind: RedisEnterpriseCluster + metadata: + name: rec + spec: + nodes: 3 + redisOnFlashSpec: + enabled: true + flashStorageClassName: local-flash + flashDiskSize: 100Gi + storageEngine: speedb + ``` -1. Apply the updated REC configuration: +1. Apply the REC configuration: ```sh kubectl apply -f rec.yaml ``` -2. Verify that the cluster is ready: +1. Verify that the cluster is ready: ```sh kubectl get rec ``` -## Create a Redis Flex database - -After you configure the cluster, create a `RedisEnterpriseDatabase` (REDB) resource with Redis Flex enabled. - -### Configure the REDB +## Create a Flex database -Create a database specification with `isRof` set to `true`. +After you configure the cluster, create a `RedisEnterpriseDatabase` (REDB) resource with Flex enabled. Key fields in the REDB: | Field | Description | |--------------|--------------------------------------------------------| -| `memorySize` | Total database size (RAM + Flash). | -| `isRof` | Set to `true` to enable Redis Flex for this database. | +| `memorySize` | Total database size (RAM + flash). | +| `isRof` | Set to `true` to enable Flex for this database. | | `rofRamSize` | Amount of RAM allocated to the database. | -### Apply the database configuration +For all available fields, see the [REDB API reference]({{}}). + +1. Create a database specification file with `isRof` set to `true` similar to the following example: + + ```yaml + apiVersion: app.redislabs.com/v1alpha1 + kind: RedisEnterpriseDatabase + metadata: + name: flex-db + spec: + memorySize: 10Gi + isRof: true + rofRamSize: 2Gi + ``` 1. Apply the REDB: @@ -90,15 +109,15 @@ Key fields in the REDB: kubectl apply -f redb.yaml ``` -2. Verify the database status: +1. Verify the database status: ```sh kubectl get redb ``` -## Verify Redis Flex is active +## Verify Flex is active -To confirm that Redis Flex is working: +To confirm that Flex is working: 1. Check the database status: From c74273596957bfad184cf92759584f65e8120a30 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Thu, 12 Mar 2026 14:44:35 -0500 Subject: [PATCH 11/11] remove old page add alias --- .../operate/kubernetes/flex/get-started.md | 1 + .../kubernetes/re-clusters/redis-flex.md | 161 ------------------ 2 files changed, 1 insertion(+), 161 deletions(-) delete mode 100644 content/operate/kubernetes/re-clusters/redis-flex.md diff --git a/content/operate/kubernetes/flex/get-started.md b/content/operate/kubernetes/flex/get-started.md index 73ca14f51f..2fb5a4d943 100644 --- a/content/operate/kubernetes/flex/get-started.md +++ b/content/operate/kubernetes/flex/get-started.md @@ -9,6 +9,7 @@ description: Configure Flex on your Redis Enterprise cluster for Kubernetes. hideListLinks: true linkTitle: Get started weight: 20 +aliases: /operate/kubernetes/re-clusters/redis-flex/ --- {{}} diff --git a/content/operate/kubernetes/re-clusters/redis-flex.md b/content/operate/kubernetes/re-clusters/redis-flex.md deleted file mode 100644 index 1aa00c3de0..0000000000 --- a/content/operate/kubernetes/re-clusters/redis-flex.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -Title: Use Redis Flex on Kubernetes -alwaysopen: false -categories: -- docs -- operate -- kubernetes -description: Deploy a cluster with Redis Flex on Kubernetes. -linkTitle: Redis Flex -weight: 16 ---- - -{{}} -This page applies to Redis Enterprise for Kubernetes version 8.0.2-2 and later. If you use version 7.22.2-22 or earlier, see [Auto Tiering](https://redis.io/docs/latest/operate/kubernetes/7.22/re-clusters/auto-tiering/). -{{}} - -## Overview - -[Redis Flex]({{< relref "/operate/rs/databases/flash" >}}) (previously known as Redis on Flash) extends your node memory to use both RAM and flash storage. Solid state drives (SSDs) store infrequently used (warm) keys and values, while RAM stores frequently used (hot) keys and values. This approach improves performance and lowers costs for large datasets. - -Redis Flex provides automatic RAM management and improved performance compared to Auto Tiering. - -{{}} -For best performance, use NVMe (non-volatile memory express) SSDs. -{{}} - - -## Redis Flex vs Auto Tiering - -{{}} -Redis Flex is not supported for [Active-Active databases]({{< relref "/operate/kubernetes/active-active" >}}). -{{}} - -Before creating your Redis clusters or databases, these SSDs must be: - - -The earlier implementation of Redis Flex is called Auto Tiering, which is available in Redis versions earlier than 8.0. - -The operator automatically selects the appropriate implementation based on your Redis version: - -- **Versions 7.22.2-22 and earlier:** Auto Tiering -- **Versions 8.0.2-2 and later:** Redis Flex - -Redis Flex differs from Auto Tiering in the following ways: - -**Redis Flex (8.0.2-2 and later)** - -- Storage engine: Speedb only -- RAM management: Automatic. Redis manages RAM allocation internally. -- Configuration: `rofRamSize` isn't validated with minimum ratio requirements. -- Redis versions: Redis 8.0 and later - -**Auto Tiering ( 7.22.2-22 and earlier)** - -- Storage engine: RocksDB or Speedb -- RAM management: Manual. Requires explicit `rofRamSize` configuration. -- Validation: `rofRamSize` must be at least 10% of `memorySize` and can't exceed `memorySize`. -- Redis versions: Redis versions earlier than 8.0 - -The operator doesn't support Redis 7.4 preview for Redis Flex. Redis 7.4 databases use Auto Tiering regardless of cluster policy. To use Redis Flex, upgrade to Redis 8.0 or later. - -## Prerequisites - -Before you create your Redis clusters or databases, ensure that your SSDs meet the following requirements: - -- [Locally attached to worker nodes in your Kubernetes cluster](https://kubernetes.io/docs/concepts/storage/volumes/#local) -- Formatted and mounted on the nodes that run Redis Enterprise pods -- Dedicated to Redis Flex and not shared with other parts of the database (for example, durability or binaries) -- [Provisioned as local persistent volumes](https://kubernetes.io/docs/concepts/storage/volumes/#local) - - You can use a [local volume provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/master/README.md) to provision volumes [dynamically](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic). -- Configured with a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/#local) resource that has a unique name - -For more information about node storage, see [Node persistent and ephemeral storage]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}). - -## Create a Redis Enterprise cluster - -To deploy a Redis Enterprise cluster (REC) with Redis Flex, specify the following fields in the `redisOnFlashSpec` section of your [REC custom resource]({{< relref "/operate/kubernetes/reference/api/redis_enterprise_cluster_api#specredisonflashspec" >}}): - -- `enabled: true` - Enables Redis Flex -- `bigStoreDriver: speedb` - Sets the flash storage driver -- `storageClassName` - Specifies the storage class name -- `flashDiskSize` - Sets the minimum flash disk size - -{{}} -Redis Flex doesn't support PVC expansion. Do not enable `enablePersistentVolumeResize` in the REC `persistentSpec` if you use `redisOnFlashSpec`. Enabling both will cause conflicts. -{{}} - -The following example shows a Redis Enterprise cluster custom resource with these fields: - -```yaml -apiVersion: app.redislabs.com/v1 -kind: RedisEnterpriseCluster -metadata: - name: "rec" - labels: - app: redis-enterprise -spec: - nodes: 3 - redisOnFlashSpec: - enabled: true - bigStoreDriver: speedb # Only 'speedb' is suitable for Redis Flex - storageClassName: local-scsi - flashDiskSize: 100G -``` - -{{}} - -- Set the `enabled` field to `true`. -- Use `bigStoreDriver: speedb` for Redis Flex support on Redis 8.0 and later. -- The `flashStorageEngine` field is deprecated. Use `bigStoreDriver` instead. - -{{}} - -## Create a Redis Enterprise database - -By default, new databases use RAM only. To create a Redis Enterprise database (REDB) that uses Redis Flex and takes advantage of locally attached SSDs, set `isRof` to `true`. - -Specify the following fields in the REDB custom resource: - -- `isRof: true` - Enables Redis Flex -- `redisVersion` - Set to `"8.0"` or later -- `memorySize` - Defines the total combined memory size (RAM + flash) -- `rofRamSize` - (Optional) Defines the RAM capacity for the database - -The following example shows a REDB custom resource: - -```YAML -apiVersion: app.redislabs.com/v1alpha1 -kind: RedisEnterpriseDatabase -metadata: - name: redis-flex-db -spec: - redisEnterpriseCluster: - name: rec - isRof: true - redisVersion: "8.0" - memorySize: 2GB - rofRamSize: 0.5GB -``` - -{{< note >}} -Redis Flex automatically manages RAM allocation. You can specify `rofRamSize`, but it isn't subject to the 10% minimum ratio requirement that applies to Auto Tiering. The operator doesn't validate or enforce minimum RAM ratios for Redis 8.0 and later databases. -{{< /note >}} - -## Upgrade from Auto Tiering to Redis Flex - -When you upgrade a database from a Redis version earlier than 8.0 to Redis 8.0 or later, Redis Server automatically migrates the database from Auto Tiering to Redis Flex. The operator detects this migration and makes the following changes: - -1. Stops validating the `rofRamSize` ratio requirement. -2. Stops reconciling the `bigstore_ram_size` field to avoid configuration drift. -3. Continues to preserve the database configuration. - -### Example upgrade scenario - -The following example shows how to upgrade a database from Auto Tiering to Redis Flex: - -1. Create a database on Redis 7.2 with `rofRamSize: 200MB`. -2. Upgrade the database to Redis 8.0 by updating `spec.redisVersion` to `"8.0"`. -3. Redis Server automatically converts the database to Redis Flex. -4. The operator detects the conversion and adapts its reconciliation behavior. -5. Redis now manages the `rofRamSize` field automatically. You can keep the field in the spec for backward compatibility.