Skip to content

Commit bd1fa44

Browse files
committed
fix links, acrolinx, warning
1 parent e3b0e6e commit bd1fa44

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

articles/azure-cache-for-redis/cache-management-faq.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
metadata:
33
title: Azure Cache for Redis management FAQs
44
description: Learn the answers to common questions that help you manage Azure Cache for Redis
5-
6-
7-
85
ms.topic: faq
96
ms.custom: devx-track-csharp, ignite-2024
107
ms.date: 04/04/2023
@@ -23,7 +20,7 @@ sections:
2320
Redis server doesn't natively support TLS, but Azure Cache for Redis does. If you're connecting to Azure Cache for Redis and your client supports TLS, like StackExchange.Redis, then use TLS.
2421
2522
>[!NOTE]
26-
>The non-TLS port is disabled by default for new Azure Cache for Redis instances. If your client does not support TLS, then you must enable the non-TLS port by following the directions in the [Access ports](cache-configure.md#access-ports) section of the [Configure a cache in Azure Cache for Redis](cache-configure.md) article.
23+
>The non-TLS port is disabled by default for new Azure Cache for Redis instances. If your client doesn't support TLS, then you must enable the non-TLS port by following the directions in the [Access ports](cache-configure.md#access-ports) section of the [Configure a cache in Azure Cache for Redis](cache-configure.md) article.
2724
>
2825
>
2926
@@ -45,14 +42,14 @@ sections:
4542
4643
- Set `AbortConnect` to false, then let the ConnectionMultiplexer reconnect automatically.
4744
- Use a single, long-lived `ConnectionMultiplexer` instance rather than creating a new connection for each request.
48-
- Redis works best with smaller values, so consider chopping up bigger data into multiple keys. In [this Redis discussion](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ), 100 kb is considered large. For more information, see [Best practices development](cache-best-practices-development.md#consider-more-keys-and-smaller-values).
49-
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid timeouts.
45+
- Redis works best with smaller values, so consider chopping up bigger data into multiple keys. In [this discussion](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ), 100 kb is considered large. For more information, see [Best practices development](cache-best-practices-development.md#consider-more-keys-and-smaller-values).
46+
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid time-outs.
5047
- Use at least the default connectTimeout of 5 seconds. This interval gives StackExchange.Redis sufficient time to re-establish the connection if there's a network blip.
5148
- Be aware of the performance costs associated with different operations you're running. For instance, the `KEYS` command is an O(n) operation and should be avoided. The [redis.io site](https://redis.io/commands/) has details around the time complexity for each operation that it supports. Select each command to see the complexity for each operation.
5249
- Set `AbortConnect` to false, then let the ConnectionMultiplexer reconnect automatically.
5350
- Use a single, long-lived `ConnectionMultiplexer` instance rather than creating a new connection for each request.
54-
- Redis works best with smaller values, so consider chopping up bigger data into multiple keys. In [this Redis discussion](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ), 100 kb is considered large. For more information, see [Best practices development](cache-best-practices-development.md#consider-more-keys-and-smaller-values).
55-
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid timeouts.
51+
- Redis works best with smaller values, so consider chopping up bigger data into multiple keys. In [this discussion](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ), 100 kb is considered large. For more information, see [Best practices development](cache-best-practices-development.md#consider-more-keys-and-smaller-values).
52+
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid time-outs.
5653
- Use at least the default connectTimeout of 5 seconds. This interval gives StackExchange.Redis sufficient time to re-establish the connection if there's a network blip.
5754
- Be aware of the performance costs associated with different operations you're running. For instance, the `KEYS` command is an O(n) operation and should be avoided. The [redis.io site](https://redis.io/commands/) has details around the time complexity for each operation that it supports. Select each command to see the complexity for each operation.
5855
@@ -76,7 +73,7 @@ sections:
7673
answer: |
7774
- Avoid using certain Redis commands that take a long time to complete, unless you fully understand the result of these commands. For example, don't run the [KEYS](https://redis.io/commands/keys) command in production. Depending on the number of keys, it could take a long time to return. Redis is a single-threaded server and it processes commands one at a time. If you have other commands issued after KEYS, they're not be processed until Redis processes the KEYS command. The [redis.io site](https://redis.io/commands/) has details around the time complexity for each operation that it supports. Select each command to see the complexity for each operation.
7875
- Key sizes - should I use small key/values or large key/values? It depends on the scenario. If your scenario requires larger keys, you can adjust the ConnectionTimeout, then retry values and adjust your retry logic. From a Redis server perspective, smaller values give better performance.
79-
- These considerations don't mean that you can't store larger values in Redis; you must be aware of the following considerations. Latencies will be higher. If you have one set of data that is larger and one that is smaller, you can use multiple ConnectionMultiplexer instances. Configure each with a different set of timeout and retry values, as described in the previous [What do the StackExchange.Redis configuration options do](cache-development-faq.yml#what-do-the-stackexchange-redis-configuration-options-do-) section.
76+
- These considerations don't mean that you can't store larger values in Redis; you must be aware of the following considerations. Latencies are higher. If you have one set of data that is larger and one that is smaller, you can use multiple ConnectionMultiplexer instances. Configure each with a different set of time-out and retry values, as described in the previous [What do the StackExchange.Redis configuration options do](cache-development-faq.yml#what-do-the-stackexchange-redis-configuration-options-do-) section.
8077
8178
- question: |
8279
How can I benchmark and test the performance of my cache?
@@ -97,7 +94,7 @@ sections:
9794
- Test Pipelined GET requests using a 1k payload.
9895
9996
>[!NOTE]
100-
> Run the SET test shown above first to populate cache
97+
> Run the SET test shown previously first to populate cache
10198
>
10299
103100
`redis-benchmark.exe -h <yourcache>.redis.cache.windows.net -a <yourAccesskey> -t GET -n 1000000 -d 1024 -P 50`
@@ -112,14 +109,14 @@ sections:
112109
113110
The thread pool provides new worker threads or I/O completion threads on demand (without any throttling) until it reaches the "Minimum" setting for each type of thread. By default, the minimum number of threads is set to the number of processors on a system.
114111
115-
Once the number of existing (busy) threads hits the "minimum" number of threads, the ThreadPool will throttle the rate at which it injects new threads to one thread per 500 milliseconds. Typically, if your system gets a burst of work needing an IOCP thread, it will process that work quickly. However, if the burst is more than the configured "Minimum" setting, there's some delay in processing some of the work as the ThreadPool waits for one of two possibilities:
112+
Once the number of existing (busy) threads hits the "minimum" number of threads, the ThreadPool throttles the rate at which it injects new threads to one thread per 500 milliseconds. Typically, if your system gets a burst of work needing an IOCP thread, it processes that work quickly. However, if the burst is more than the configured "Minimum" setting, there's some delay in processing some of the work as the ThreadPool waits for one of two possibilities:
116113
117114
- An existing thread becomes free to process the work.
118-
- No existing thread becomes free for 500 ms and a new thread is created.
115+
- No existing thread becomes free for 500 ms and a new thread is created.
119116
120-
Basically, when the number of Busy threads is greater than Min threads, you're likely paying a 500-ms delay before network traffic is processed by the application. Also, when an existing thread stays idle for longer than 15 seconds, it's cleaned up and this cycle of growth and shrinkage can repeat.
117+
Basically, when the number of Busy threads is greater than Min threads, you're likely paying a 500-ms delay before the application processes the network traffic. Also, when an existing thread stays idle for longer than 15 seconds, it's cleaned up and this cycle of growth and shrinkage can repeat.
121118
122-
If we look at an example error message from StackExchange.Redis (build 1.0.450 or later), we see that it now prints ThreadPool statistics. See IOCP and WORKER details below.
119+
If we look at an example error message from StackExchange.Redis (build 1.0.450 or later), we see that it now prints ThreadPool statistics. See IOCP and WORKER details later in the article.
123120
124121
```
125122
System.TimeoutException: Timeout performing GET MyKey, inst: 2, mgr: Inactive,
@@ -128,10 +125,10 @@ sections:
128125
WORKER: (Busy=3,Free=997,Min=4,Max=1000)
129126
```
130127
131-
As shown In the example, you see that for IOCP thread there are six busy threads and the system is configured to allow four minimum threads. In this case, the client would have likely seen two 500-ms delays, because 6 > 4.
128+
As shown In the example, you see that for IOCP thread there are six busy threads and the system is configured to allow four minimum threads. In this case, the client is likely to see two 500-ms delays, because 6 > 4.
132129
133130
> [!NOTE]
134-
> StackExchange.Redis can hit timeouts if growth of either IOCP or WORKER threads gets throttled.
131+
> StackExchange.Redis can hit time-outs if growth of either IOCP or WORKER threads gets throttled.
135132
136133
### Recommendation
137134

@@ -166,15 +163,15 @@ sections:
166163
```
167164

168165
> [!NOTE]
169-
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a 4-core machine and want to set `minWorkerThreads` and `minIoThreads` to 50 per CPU during run-time, use `ThreadPool.SetMinThreads(200, 200)`.
166+
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a four core machine and want to set `minWorkerThreads` and `minIoThreads` to 50 per CPU during run-time, use `ThreadPool.SetMinThreads(200, 200)`.
170167
>
171168

172-
It is also possible to specify the minimum threads setting by using the `minIoThreads` or `minWorkerThreads` [configuration setting](/previous-versions/dotnet/netframework-4.0/7w2sway1(v=vs.100) under the `processModel` configuration element in `Machine.config`. `Machine.config` is typically located at `%SystemRoot%\Microsoft.NET\Framework\[versionNumber]\CONFIG\`.
169+
It's also possible to specify the minimum threads setting by using the `minIoThreads` or `minWorkerThreads` [configuration setting](/previous-versions/dotnet/netframework-4.0/7w2sway1(v=vs.100)) under the `<processModel>` configuration element in `Machine.config`. `Machine.config` is typically located at `%SystemRoot%\Microsoft.NET\Framework\[versionNumber]\CONFIG\`.
173170

174171
Setting the number of minimum threads in this way isn't recommended because it's a system-wide setting. If you do set it this way, you must restart the application pool.
175172

176173
> [!NOTE]
177-
> The value specified in this configuration element is a _per-core_ setting. For example, if you have a 4-core machine and want your `minIoThreads` setting to be 200 at runtime, use `<processModel minIoThreads="50"\>`.
174+
> The value specified in this configuration element is a _per-core_ setting. For example, if you have a four core machine and want your `minIoThreads` setting to be 200 at runtime, use `<processModel minIoThreads="50"\>`.
178175
>
179176

180177
- question: |

articles/redis/management-faq.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sections:
3636
- Set `AbortConnect` to false, then let the ConnectionMultiplexer reconnect automatically.
3737
- Use a single, long-lived `ConnectionMultiplexer` instance rather than creating a new connection for each request.
3838
- Redis works best with smaller values, so consider chopping up bigger data into multiple keys. In [the Redis discussion](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ), 100 kb is considered large. For more information, see [Best practices development](best-practices-development.md#consider-more-keys-and-smaller-values).
39-
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid timeouts.
39+
- Configure your [ThreadPool settings](#important-details-about-threadpool-growth) to avoid time-outs.
4040
- Use at least the default connectTimeout of 5 seconds. This interval gives StackExchange.Redis sufficient time to re-establish the connection if there's a network blip.
4141
- Be aware of the performance costs associated with different operations you're running. For instance, the `KEYS` command is an O(n) operation and should be avoided. The [redis.io site](https://redis.io/commands/) has details around the time complexity for each operation that it supports. Select each command to see the complexity for each operation.
4242
@@ -54,7 +54,7 @@ sections:
5454
answer: |
5555
- Avoid using certain Redis commands that take a long time to complete, unless you fully understand the result of these commands. For example, don't run the [KEYS](https://redis.io/commands/keys) command in production. Depending on the number of keys, it could take a long time to return. Each Redis shard is a single-threaded, and it processes commands one at a time. If you have other commands issued after KEYS, they're not be processed until Redis processes the KEYS command. The [redis.io site](https://redis.io/commands/) has details around the time complexity for each operation that it supports. Select each command to see the complexity for each operation.
5656
- Key sizes - should I use small key/values or large key/values? It depends on the scenario. If your scenario requires larger keys, you can adjust the ConnectionTimeout, then retry values and adjust your retry logic. From a Redis server perspective, smaller values give better performance.
57-
- These considerations don't mean that you can't store larger values in Redis; you must be aware of the following considerations. Latencies are higher. If you have one set of data that is larger and one that is smaller, you can use multiple ConnectionMultiplexer instances. Configure each with a different set of timeout and retry values, as described in the previous [What do the StackExchange.Redis configuration options do](development-faq.yml#what-do-the-stackexchange-redis-configuration-options-do-) section.
57+
- These considerations don't mean that you can't store larger values in Redis; you must be aware of the following considerations. Latencies are higher. If you have one set of data that is larger and one that is smaller, you can use multiple ConnectionMultiplexer instances. Configure each with a different set of time-out and retry values, as described in the previous [What do the StackExchange.Redis configuration options do](development-faq.yml#what-do-the-stackexchange-redis-configuration-options-do-) section.
5858
5959
- question: |
6060
How can I benchmark and test the performance of my cache?
@@ -77,9 +77,9 @@ sections:
7777
- An existing thread becomes free to process the work.
7878
- No existing thread becomes free for 500 ms and a new thread is created.
7979
80-
Basically, when the number of Busy threads is greater than Min threads, you're likely paying a 500-ms delay before network traffic is processed by the application. Also, when an existing thread stays idle for longer than 15 seconds, it gets cleaned up and this cycle of growth and shrinkage can repeat.
80+
Basically, when the number of Busy threads is greater than Min threads, you're likely paying a 500-ms delay before the application processes the network traffic. Also, when an existing thread stays idle for longer than 15 seconds, it gets cleaned up and this cycle of growth and shrinkage can repeat.
8181
82-
If we look at an example error message from StackExchange.Redis (build 1.0.450 or later), we see that it now prints ThreadPool statistics. See IOCP and WORKER details below.
82+
If we look at an example error message from StackExchange.Redis (build 1.0.450 or later), we see that it now prints ThreadPool statistics. See IOCP and WORKER details later in the article.
8383
8484
```
8585
System.TimeoutException: Timeout performing GET MyKey, inst: 2, mgr: Inactive,
@@ -115,7 +115,7 @@ sections:
115115
ThreadPool.SetMinThreads(minThreads, minThreads);
116116
}
117117
```
118-
If you are using .NET Core, you set it in `Program.cs`, just before the call to `WebApplication.CreateBuilder()`:
118+
If you're using .NET Core, you set it in `Program.cs`, just before the call to `WebApplication.CreateBuilder()`:
119119

120120
```csharp
121121
const int minThreads = 200
@@ -129,12 +129,12 @@ sections:
129129
> The value specified by this method is a global setting, affecting the whole AppDomain. For example, if you have a machine with four cores and want to set `minWorkerThreads` and `minIoThreads` to 50 per CPU during run-time, use `ThreadPool.SetMinThreads(200, 200)`.
130130
>
131131

132-
It's also possible to specify the minimum threads setting by using the `minIoThreads`` or `minWorkerThreads` [configuration setting](/previous-versions/dotnet/netframework-4.0/7w2sway1(v=vs.100) under the `<processModel>` configuration element in `Machine.config`. `Machine.config` is typically located at `%SystemRoot%\Microsoft.NET\Framework\[versionNumber]\CONFIG\`.
132+
It's also possible to specify the minimum threads setting by using the `minIoThreads`` or `minWorkerThreads` [configuration setting](/previous-versions/dotnet/netframework-4.0/7w2sway1(v=vs.100)) under the `<processModel>` configuration element in `Machine.config`. `Machine.config` is typically located at `%SystemRoot%\Microsoft.NET\Framework\[versionNumber]\CONFIG\`.
133133

134134
Setting the number of minimum threads in this way isn't recommended because it's a system-wide setting. If you do set it this way, you must restart the application pool.
135135

136136
> [!NOTE]
137-
> The value specified in this configuration element is a _per-core_ setting. For example, if you have a machine with four cores and want your `minIoThreads` setting to be 200 at runtime, you would use `<processModel minIoThreads="50">`.
137+
> The value specified in this configuration element is a _per-core_ setting. For example, if you have a four core machine and want your `minIoThreads` setting to be 200 at runtime, use `<processModel minIoThreads="50"\>`.
138138
>
139139

140140
- question: |

0 commit comments

Comments
 (0)