You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-best-practices-development.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,11 @@ When developing client applications, be sure to consider the relevant best pract
18
18
19
19
## Consider more keys and smaller values
20
20
21
-
Azure Cache for Redis works best with smaller values. Consider dividing bigger chunks of data in to smaller chunks to spread the data over multiple keys. For more information on ideal value size, see this [article](https://stackoverflow.com/questions/55517224/what-is-the-ideal-value-size-range-for-redis-is-100kb-too-large/).
21
+
Azure Cache for Redis works best with smaller values. To spread the data over multiple keys, consider dividing bigger chunks of data in to smaller chunks. For more information on ideal value size, see this [article](https://stackoverflow.com/questions/55517224/what-is-the-ideal-value-size-range-for-redis-is-100kb-too-large/).
22
22
23
23
## Large request or response size
24
24
25
-
A large request/response can cause timeouts. As an example, suppose your timeout value configured on your client is 1 second. Your application requests two keys (for example, 'A' and 'B') at the same time (using the same physical network connection). Most clients support request "pipelining", where both requests 'A' and 'B' are sent one after the other without waiting for their responses. The server sends the responses back in the same order. If response 'A' is large, it can eat up most of the timeout for later requests.
25
+
A large request/response can cause timeouts. As an example, suppose your timeout value configured on your client is 1 second. Your application requests two keys (for example, 'A' and 'B') at the same time (using the same physical network connection). Most clients support request _pipelining_, where both requests 'A' and 'B' are sent one after the other without waiting for their responses. The server sends the responses back in the same order. If response 'A' is large, it can eat up most of the timeout for later requests.
26
26
27
27
In the following example, request 'A' and 'B' are sent quickly to the server. The server starts sending responses 'A' and 'B' quickly. Because of data transfer times, response 'B' must wait behind response 'A' times out even though the server responded quickly.
28
28
@@ -42,9 +42,9 @@ Resolutions for large response sizes are varied but include:
42
42
- Optimize your application for a large number of small values, rather than a few large values.
43
43
- The preferred solution is to break up your data into related smaller values.
44
44
- See the post [What is the ideal value size range for redis? Is 100 KB too large?](https://groups.google.com/forum/#!searchin/redis-db/size/redis-db/n7aa2A4DZDs/3OeEPHSQBAAJ) for details on why smaller values are recommended.
45
-
- Increase the size of your VM to get higher bandwidth capabilities
46
-
- More bandwidth on your client or server VM may reduce data transfer times for larger responses.
47
-
- Compare your current network usage on both machines to the limits of your current VM size. More bandwidth on only the server or only on the client may not be enough.
45
+
- Increase the size of your virtual machine (VM) to get higher bandwidth capabilities
46
+
- More bandwidth on your client or server VM can reduce data transfer times for larger responses.
47
+
- Compare your current network usage on both machines to the limits of your current VM size. More bandwidth on only the server or only on the client might not be enough.
48
48
- Increase the number of connection objects your application uses.
49
49
- Use a round-robin approach to make requests over different connection objects.
50
50
@@ -62,7 +62,7 @@ Some Redis operations, like the [KEYS](https://redis.io/commands/keys) command,
62
62
63
63
## Choose an appropriate tier
64
64
65
-
Use Standard, Premium, Enterprise, or Enterprise Flash tiers for production systems. Don't use the Basic tier in production. The Basic tier is a single node system with no data replication and no SLA. Also, use at least a C1 cache. C0 caches are only meant for simple dev/test scenarios because:
65
+
Use Standard, Premium, Enterprise, or Enterprise Flash tiers for production systems. Don't use the Basic tier in production. The Basic tier is a single node system with no data replication and no SLA. Also, use at least a C1 cache. C0 caches are only meant for simple dev/test scenarios because:
66
66
67
67
- they share a CPU core
68
68
- use little memory
@@ -91,7 +91,7 @@ The default version of Redis that is used when creating a cache can change over
91
91
92
92
## Specific guidance for the Enterprise tiers
93
93
94
-
Because the _Enterprise_ and _Enterprise Flash_ tiers are built on Redis Enterprise rather than open-source Redis, there are some differences in development best practices. See [Best Practices for the Enterprise and Enterprise Flash tiers](cache-best-practices-enterprise-tiers.md) for more information.
94
+
Because the _Enterprise_ and _Enterprise Flash_ tiers are built on Redis Enterprise rather than open-source Redis, there are some differences in development best practices. For more information, see [Best Practices for the Enterprise and Enterprise Flash tiers](cache-best-practices-enterprise-tiers.md).
95
95
96
96
## Use TLS encryption
97
97
@@ -101,7 +101,7 @@ If your client library or tool doesn't support TLS, then enabling unencrypted co
101
101
102
102
### Azure TLS Certificate Change
103
103
104
-
Microsoft is updating Azure services to use TLS server certificates from a different set of Certificate Authorities (CAs). This change is rolled out in phases from August 13, 2020 to October 26, 2020 (estimated). Azure is making this change because [the current CA certificates don't one of the CA/Browser Forum Baseline requirements](https://bugzilla.mozilla.org/show_bug.cgi?id=1649951). The problem was reported on July 1, 2020 and applies to multiple popular Public Key Infrastructure (PKI) providers worldwide. Most TLS certificates used by Azure services today come from the _Baltimore CyberTrust Root_ PKI. The Azure Cache for Redis service will continue to be chained to the Baltimore CyberTrust Root. Its TLS server certificates, however, will be issued by new Intermediate Certificate Authorities (ICAs) starting on October 12, 2020.
104
+
Microsoft is updating Azure services to use TLS server certificates from a different set of Certificate Authorities (CAs). This change is rolled out in phases from August 13, 2020 to October 26, 2020 (estimated). Azure is making this change because [the current CA certificates don't one of the CA/Browser Forum Baseline requirements](https://bugzilla.mozilla.org/show_bug.cgi?id=1649951). The problem was reported on July 1, 2020 and applies to multiple popular Public Key Infrastructure (PKI) providers worldwide. Most TLS certificates used by Azure services today come from the _Baltimore CyberTrust Root_ PKI. The Azure Cache for Redis service continues to be chained to the Baltimore CyberTrust Root. Its TLS server certificates, however, will be issued by new Intermediate Certificate Authorities (ICAs) starting on October 12, 2020.
105
105
106
106
> [!NOTE]
107
107
> This change is limited to services in public [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/). It excludes sovereign (e.g., China) or government clouds.
@@ -110,7 +110,7 @@ Microsoft is updating Azure services to use TLS server certificates from a diffe
110
110
111
111
#### Does this change affect me?
112
112
113
-
We expect that most Azure Cache for Redis customers aren't affected by the change. Your application might be affected if it explicitly specifies a list of acceptable certificates, a practice known as “certificate pinning”. If it's pinned to an intermediate or leaf certificate instead of the Baltimore CyberTrust Root, you should take immediate actions to change the certificate configuration.
113
+
Most Azure Cache for Redis customers aren't affected by the change. Your application might be affected if it explicitly specifies a list of acceptable certificates, a practice known as _certificate pinning_. If it's pinned to an intermediate or leaf certificate instead of the Baltimore CyberTrust Root, you should take immediate actions to change the certificate configuration.
114
114
115
115
Azure Cache for Redis doesn't support [OCSP stapling](https://docs.redis.com/latest/rs/security/certificates/ocsp-stapling/).
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-development-faq.yml
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
### YamlMime:FAQ
2
2
metadata:
3
3
title: Azure Cache for Redis development FAQs
4
-
description: Learn the answers to common questions that help you develop for Azure Cache for Redis
4
+
description: Learn the answers to common questions that help you develop for Azure Cache for Redis.
5
5
author: flang-msft
6
6
ms.author: franlanglois
7
7
ms.service: cache
@@ -43,12 +43,12 @@ sections:
43
43
44
44
Usually the default values of the client are sufficient. You can fine-tune the options based on your workload.
45
45
46
-
* **Retries**
46
+
### Retries
47
47
* For ConnectRetry and ConnectTimeout, the general guidance is to fail fast and retry again. This guidance is based on your workload and how much time---on average---it takes for your client to issue a Redis command and receive a response.
48
48
* Let StackExchange.Redis automatically reconnect instead of checking connection status and reconnecting yourself. **Avoid using the ConnectionMultiplexer.IsConnected property**.
49
49
* Snowballing - you might run into an issue where you're retrying and the retries snowball and never recover. If snowballing occurs, consider using an exponential backoff retry algorithm as described in [Retry general guidance](/azure/architecture/best-practices/transient-faults) published by the Microsoft Patterns & Practices group.
50
50
51
-
* **Timeout values**
51
+
###Timeout values
52
52
* Consider your workload and set the values to match. If you're storing large values, set the timeout to a higher value.
53
53
* Set `AbortOnConnectFail` to false and let StackExchange.Redis reconnect for you.
54
54
* Use a single, long-lived `ConnectionMultiplexer` instance rather than creating a new connection for each request. For an example of how to manage a connection, see the `RedisConnection`` class in [Connect to the cache with RedisConnection](cache-dotnet-how-to-use-azure-redis-cache.md#connect-to-the-cache-with-redisconnection).
@@ -59,7 +59,7 @@ sections:
59
59
* You can have one multiplexer for dealing with small keys.
60
60
* You can set different values for connection timeouts and retry logic for each ConnectionMultiplexer that you use.
61
61
* Set the `ClientName` property on each multiplexer to help with diagnostics.
62
-
* This guidance may lead to more streamlined latency per `ConnectionMultiplexer`.
62
+
* This guidance might lead to more streamlined latency per `ConnectionMultiplexer`.
63
63
64
64
- question: |
65
65
What Azure Cache for Redis clients can I use?
@@ -90,7 +90,7 @@ sections:
90
90
}
91
91
}
92
92
```
93
-
93
+
94
94
You can optionally configure a [redis.conf](https://redis.io/topics/config) file to more closely match the [default cache settings](cache-configure.md#default-redis-server-configuration) for your online Azure Cache for Redis if you want.
95
95
96
96
- question: |
@@ -110,14 +110,14 @@ sections:
110
110
`redis-cli -h <Azure Cache for Redis name>.redis.cache.windows.net -a <key>`
111
111
112
112
> [!NOTE]
113
-
> The Redis command-line tools do not work with the TLS port, but you can use a utility such as `stunnel` to securely connect the tools to the TLS port by following the directions in the [How to use the Redis command-line tool with Azure Cache for Redis](./cache-how-to-redis-cli-tool.md) article.
113
+
> The Redis command-line tools don't work with the TLS port, but you can use a utility such as `stunnel` to securely connect the tools to the TLS port by following the directions in the [How to use the Redis command-line tool with Azure Cache for Redis](./cache-how-to-redis-cli-tool.md) article.
114
114
>
115
115
>
116
116
117
117
- question: |
118
118
Why doesn't Azure Cache for Redis have an MSDN class library reference?
119
119
answer: |
120
-
Microsoft Azure Cache for Redis is based on the popular open-source in-memory data store, Redis. It can be accessed by a wide variety of [Redis clients](https://redis.io/docs/connect/clients/) for many programming languages. Each client has its own API that makes calls to the Azure Cache for Redis instance using [Redis commands](https://redis.io/commands).
120
+
Microsoft Azure Cache for Redis is based on the popular open-source in-memory data store, Redis. You can use a wide variety of [Redis clients](https://redis.io/docs/connect/clients/) for many programming languages. Each client has its own API that makes calls to the Azure Cache for Redis instance using [Redis commands](https://redis.io/commands).
121
121
122
122
Because each client is different, you can't find one centralized class reference on MSDN. Each client maintains its own reference documentation. Besides the reference documentation, there are several tutorials showing how to get started with Azure Cache for Redis using different languages and cache clients. To access these tutorials, see [How to use Azure Cache for Redis](cache-dotnet-how-to-use-azure-redis-cache.md) and it's sibling articles in the table of contents.
123
123
@@ -131,7 +131,7 @@ sections:
131
131
>
132
132
> `session.save_path = "tcp://mycache.redis.cache.windows.net:6379?auth=<url encoded primary or secondary key here>";`
133
133
>
134
-
> If the key is not URL encoded, you may receive an exception with a message like: `Failed to parse session.save_path`
134
+
> If the key isn't URL encoded, you might receive an exception with a message like: `Failed to parse session.save_path`
135
135
>
136
136
137
137
For more information about using Azure Cache for Redis as a PHP session cache with the PhpRedis client, see [PHP Session handler](https://github.com/phpredis/phpredis#php-session-handler).
@@ -142,7 +142,7 @@ sections:
142
142
Redis Databases are just a logical separation of data within the same Redis instance. The cache memory is shared between all the databases and actual memory consumption of a given database depends on the keys/values stored in that database. For example, a C6 cache has 53 GB of memory, and a P5 has 120 GB. You can choose to put all 53 GB / 120 GB into one database or you can split it up between multiple databases.
143
143
144
144
> [!NOTE]
145
-
> When using a Premium Azure Cache for Redis with clustering enabled, only database 0 is available. This limitation is an intrinsic Redis limitation and is not specific to Azure Cache for Redis.
145
+
> When using a Premium Azure Cache for Redis with clustering enabled, only database 0 is available. This limitation is an intrinsic Redis limitation and isn't specific to Azure Cache for Redis.
0 commit comments