Skip to content

Commit e0011de

Browse files
Merge pull request #279843 from flang-msft/fxl---external-PR-123500--ado-28540227
Fxl external pr 123500 ado 28540227
2 parents 53b1c9c + 9906e32 commit e0011de

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

articles/azure-cache-for-redis/cache-how-to-scale.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: flang-msft
55
ms.author: franlanglois
66
ms.service: cache
77
ms.topic: conceptual
8-
ms.date: 01/05/2024
8+
ms.date: 07/01/2024
99
ms.devlang: csharp
1010
ms.custom: devx-track-azurepowershell, devx-track-azurecli
1111

@@ -41,16 +41,19 @@ You can monitor the following metrics to determine if you need to scale.
4141
- **Redis Server Load**
4242
- High Redis server load means that the server is unable to keep pace with requests from all the clients. Because a Redis server is a single threaded process, it's typically more helpful to _scale out_ rather than _scale up_. Scaling out by enabling clustering helps distribute overhead functions across multiple Redis processes. Scaling out also helps distribute TLS encryption/decryption and connection/disconnection, speeding up cache instances using TLS.
4343
- Scaling up can still be helpful in reducing server load because background tasks can take advantage of the more vCPUs and free up the thread for the main Redis server process.
44-
- The Enterprise and Enterprise Flash tiers use Redis Enterprise rather than open source Redis. One of the advantages of these tiers is that the Redis server process can take advantage of multiple vCPUs. Because of that, both scaling up and scaling out in these tiers can be helpful in reducing server load. For more information, see [Best Practices for the Enterprise and Enterprise Flash tiers of Azure Cache for Redis](cache-best-practices-enterprise-tiers.md).
44+
- The Enterprise and Enterprise Flash tiers use Redis Enterprise rather than open source Redis. One of the advantages of these tiers is the Redis server process can take advantage of multiple vCPUs. With multiple vCPUs, both scaling up and scaling out in these tiers can be helpful in reducing server load. For more information, see [Best Practices for the Enterprise and Enterprise Flash tiers of Azure Cache for Redis](cache-best-practices-enterprise-tiers.md).
4545
- **Memory Usage**
4646
- High memory usage indicates that your data size is too large for the current cache size. Consider scaling to a cache size with larger memory. Either _scaling up_ or _scaling out_ is effective here.
4747
- **Client connections**
4848
- Each cache size has a limit to the number of client connections it can support. If your client connections are close to the limit for the cache size, consider _scaling up_ to a larger tier. _Scaling out_ doesn't increase the number of supported client connections.
4949
- For more information on connection limits by cache size, see [Azure Cache for Redis Pricing](https://azure.microsoft.com/pricing/details/cache/).
5050
- **Network Bandwidth**
51-
- If the Redis server exceeds the available bandwidth, clients requests could time out because the server can't push data to the client fast enough. Check "Cache Read" and "Cache Write" metrics to see how much server-side bandwidth is being used. If your Redis server is exceeding available network bandwidth, you should consider scaling out or scaling up to a larger cache size with higher network bandwidth.
51+
- If the Redis server exceeds the available bandwidth, clients requests could time out because the server can't push data to the client fast enough. To see how much server-side bandwidth is being used, check "Cache Read" and "Cache Write" metrics. If your Redis server is exceeding available network bandwidth, you should consider scaling out or scaling up to a larger cache size with higher network bandwidth.
5252
- For Enterprise tier caches using the _Enterprise cluster policy_, scaling out doesn't increase network bandwidth.
5353
- For more information on network available bandwidth by cache size, see [Azure Cache for Redis planning FAQs](./cache-planning-faq.yml).
54+
- **Internal Defender Scans**
55+
- On _C0_ and _C1_ Standard caches, while internal Defender scanning is running on the VMs, you might see short spikes in server load not caused by an increase in cache requests. You see higher latency for requests while internal Defender scans are run on these tiers a couple of times a day. Caches on the _C0_ and _C1_ tiers only have a single core to multitask, dividing the work of serving internal Defender scanning and Redis requests. You can reduce the effect by scaling to a higher tier offering with multiple CPU cores, such as _C2_.
56+
- The increased cache size on the higher tiers helps address any latency concerns. Also, at the _C2_ level, you have support for as many as 2,000 client connections.
5457

5558
For more information on determining the cache pricing tier to use, see [Choosing the right tier](cache-overview.md#choosing-the-right-tier) and [Azure Cache for Redis planning FAQs](./cache-planning-faq.yml).
5659

@@ -77,7 +80,7 @@ You can scale out/in with the following restrictions:
7780
- _Scale out_ is only supported on the **Premium**, **Enterprise**, and **Enterprise Flash** tiers.
7881
- _Scale in_ is only supported on the **Premium** tier.
7982
- On the **Premium** tier, clustering must be enabled first before scaling in or out.
80-
- On the **Premium** tier, there is GA support for scale out up to 10 shards. Support for up to 30 shards is in preview. (For caches with two replicas, the shard limit is 20. With three replicas, shard limit is 15.)
83+
- On the **Premium** tier, support for scale out up to 10 shards is generally available. Support for up to 30 shards is in preview. (For caches with two replicas, the shard limit is 20. With three replicas, shard limit is 15.)
8184
- Only the **Enterprise** and **Enterprise Flash** tiers can scale up and scale out simultaneously.
8285

8386
## How to scale - Basic, Standard, and Premium tiers
@@ -297,7 +300,7 @@ No, your cache name and keys are unchanged during a scaling operation.
297300

298301
### How does scaling work?
299302

300-
- When you scale a **Basic** cache to a different size, it's shut down, and a new cache is provisioned using the new size. During this time, the cache is unavailable and all data in the cache is lost.
303+
- When you scale a **Basic** cache to a different size, the cache is shut down, and a new cache is provisioned using the new size. During this time, the cache is unavailable and all data in the cache is lost.
301304
- When you scale a **Basic** cache to a **Standard** cache, a replica cache is provisioned and the data is copied from the primary cache to the replica cache. The cache remains available during the scaling process.
302305
- When you scale a **Standard**, **Premium**, **Enterprise**, or **Enterprise Flash** cache to a different size, one of the replicas is shut down and reprovisioned to the new size and the data transferred over, and then the other replica does a failover before it's reprovisioned, similar to the process that occurs during a failure of one of the cache nodes.
303306
- When you scale out a clustered cache, new shards are provisioned and added to the Redis server cluster. Data is then resharded across all shards.
@@ -308,15 +311,15 @@ No, your cache name and keys are unchanged during a scaling operation.
308311

309312
- When you scale a **Basic** cache to a new size, all data is lost and the cache is unavailable during the scaling operation.
310313
- When you scale a **Basic** cache to a **Standard** cache, the data in the cache is typically preserved.
311-
- When you scale a **Standard**, **Premium**, **Enterprise**, or **Enterprise Flash** cache to a larger size, all data is typically preserved. When you scale a Standard or Premium cache to a smaller size, data can be lost if the data size exceeds the new smaller size when it's scaled down. If data is lost when scaling down, keys are evicted using the [allkeys-lru](https://redis.io/topics/lru-cache) eviction policy.
314+
- When you scale a **Standard**, **Premium**, **Enterprise**, or **Enterprise Flash** cache to a larger size, all data is typically preserved. When you scale a Standard or Premium cache to a smaller size, data can be lost if the data size exceeds the new smaller size when the cache is scaled down. If data is lost when scaling down, keys are evicted using the [allkeys-lru](https://redis.io/topics/lru-cache) eviction policy.
312315

313316
### Can I use all the features of Premium tier after scaling?
314317

315-
No, some features can only be set when you create a cache in Premium tier, and are not available after scaling.
318+
No, some features can only be set when you create a cache in Premium tier, and aren't available after scaling.
316319

317-
These features cannot be added after you create the Premium cache:
320+
These features can't be added after you create the Premium cache:
318321

319-
- VNet injection
322+
- Virtual network injection
320323
- Adding zone redundancy
321324
- Using multiple replicas per primary
322325

@@ -356,15 +359,15 @@ With [active geo-replication](cache-how-to-active-geo-replication.md) configured
356359
- You can't scale from a **Premium** cache to an **Enterprise** or **Enterprise Flash** cache.
357360
- You can't scale from a larger size down to the **C0 (250 MB)** size.
358361

359-
If a scaling operation fails, the service tries to revert the operation, and the cache will revert to the original size.
362+
If a scaling operation fails, the service tries to revert the operation, and the cache reverts to the original size.
360363

361364
### How long does scaling take?
362365

363366
Scaling time depends on a few factors. Here are some factors that can affect how long scaling takes.
364367

365368
- Amount of data: Larger amounts of data take a longer time to be replicated
366369
- High write requests: Higher number of writes mean more data replicates across nodes or shards
367-
- High server load: Higher server load means Redis server is busy and has limited CPU cycles to complete data redistribution
370+
- High server load: Higher server load means the Redis server is busy and limited CPU cycles are available to complete data redistribution
368371

369372
Generally, when you scale a cache with no data, it takes approximately 20 minutes. For clustered caches, scaling takes approximately 20 minutes per shard with minimal data.
370373

@@ -374,12 +377,12 @@ In the Azure portal, you can see the scaling operation in progress. When scaling
374377

375378
### Do I need to make any changes to my client application to use clustering?
376379

377-
- When clustering is enabled, only database 0 is available. If your client application uses multiple databases and it tries to read or write to a database other than 0, the following exception is thrown: `Unhandled Exception: StackExchange.Redis.RedisConnectionException: ProtocolFailure on GET --->` `StackExchange.Redis.RedisCommandException: Multiple databases are not supported on this server; cannot switch to database: 6`
380+
- When clustering is enabled, only database 0 is available. If your client application uses multiple databases, and it tries to read or write to a database other than zero, the following exception is thrown: `Unhandled Exception: StackExchange.Redis.RedisConnectionException: ProtocolFailure on GET --->` `StackExchange.Redis.RedisCommandException: Multiple databases are not supported on this server; cannot switch to database: 6`
378381

379382
For more information, see [Redis Cluster Specification - Implemented subset](https://redis.io/topics/cluster-spec#implemented-subset).
380383
- If you're using [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis/), you must use 1.0.481 or later. You connect to the cache using the same [endpoints, ports, and keys](cache-configure.md#properties) that you use when connecting to a cache where clustering is disabled. The only difference is that all reads and writes must be done to database 0.
381384

382-
Other clients may have different requirements. See [Do all Redis clients support clustering?](#do-all-redis-clients-support-clustering)
385+
Other clients might have different requirements. See [Do all Redis clients support clustering?](#do-all-redis-clients-support-clustering)
383386
- If your application uses multiple key operations batched into a single command, all keys must be located in the same shard. To locate keys in the same shard, see [How are keys distributed in a cluster?](#how-are-keys-distributed-in-a-cluster)
384387
- If you're using Redis ASP.NET Session State provider, you must use 2.0.1 or higher. See [Can I use clustering with the Redis ASP.NET Session State and Output Caching providers?](#can-i-use-clustering-with-the-redis-aspnet-session-state-and-output-caching-providers)
385388

@@ -409,7 +412,7 @@ The largest cache size you can have is 4.5 TB. This result is a clustered F1500
409412

410413
Many clients libraries support Redis clustering but not all. Check the documentation for the library you're using to verify you're using a library and version that support clustering. StackExchange.Redis is one library that does support clustering, in its newer versions. For more information on other clients, see the [Playing with the cluster](https://redis.io/topics/cluster-tutorial#playing-with-the-cluster) section of the [Redis cluster tutorial](https://redis.io/topics/cluster-tutorial).
411414

412-
The Redis clustering protocol requires each client to connect to each shard directly in clustering mode, and also defines new error responses such as 'MOVED' na 'CROSSSLOTS'. When you attempt to use a client library that doesn't support clustering, with a cluster mode cache, the result can be many [MOVED redirection exceptions](https://redis.io/topics/cluster-spec#moved-redirection), or just break your application, if you're doing cross-slot multi-key requests.
415+
The Redis clustering protocol requires each client to connect to each shard directly in clustering mode, and also defines new error responses such as `MOVED` na `CROSSSLOTS`. When you attempt to use a client library that doesn't support clustering, with a cluster mode cache, the result can be many [MOVED redirection exceptions](https://redis.io/topics/cluster-spec#moved-redirection), or just break your application, if you're doing cross-slot multi-key requests.
413416

414417
> [!NOTE]
415418
> If you're using StackExchange.Redis as your client, verify that you are using the latest version of [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis/) 1.0.481 or later for clustering to work correctly. For more information on any issues with move exceptions, see [move exceptions](#im-getting-move-exceptions-when-using-stackexchangeredis-and-clustering-what-should-i-do).
@@ -430,7 +433,7 @@ You need to use the `-p` switch to specify the correct port to connect to. Use t
430433

431434
### Can I configure clustering for a previously created cache?
432435

433-
Yes. First, ensure that your cache is in the Premium tier by scaling it up. Next, you can see the cluster configuration options, including an option to enable cluster. Change the cluster size after the cache is created, or after you have enabled clustering for the first time.
436+
Yes. First, ensure that your cache is in the Premium tier by scaling it up. Next, you can see the cluster configuration options, including an option to enable cluster. Change the cluster size after the cache is created, or after you enable clustering for the first time.
434437

435438
>[!IMPORTANT]
436439
>You can't undo enabling clustering. And a cache with clustering enabled and only one shard behaves _differently_ than a cache of the same size with _no_ clustering.
@@ -452,11 +455,11 @@ If you're using StackExchange.Redis and receive `MOVE` exceptions when using clu
452455

453456
### What is the difference between OSS Clustering and Enterprise Clustering on Enterprise tier caches?
454457

455-
OSS Cluster Mode is the same as clustering on the Premium tier and follows the open source clustering specification. Enterprise Cluster Mode can be less performant, but uses Redis Enterprise clustering, which doesn't require any client changes to use. For more information, see [Clustering on Enterprise](cache-best-practices-enterprise-tiers.md#clustering-on-enterprise).
458+
OSS Cluster Mode is the same as clustering on the Premium tier and follows the open source clustering specification. Enterprise Cluster Mode can be less performant, but uses Redis Enterprise clustering, which doesn't require any client changes to use. For more information, see [Clustering on Enterprise](cache-best-practices-enterprise-tiers.md#clustering-on-enterprise).
456459

457460
### How many shards do Enterprise tier caches use?
458461

459-
Unlike Basic, Standard, and Premium tier caches, Enterprise and Enterprise Flash caches can take advantage of multiple shards on a single node. For more information, see [Sharding and CPU utilization](cache-best-practices-enterprise-tiers.md#sharding-and-cpu-utilization).
462+
Unlike Basic, Standard, and Premium tier caches, Enterprise, and Enterprise Flash caches can take advantage of multiple shards on a single node. For more information, see [Sharding and CPU utilization](cache-best-practices-enterprise-tiers.md#sharding-and-cpu-utilization).
460463

461464
## Next steps
462465

0 commit comments

Comments
 (0)