Skip to content

Commit 9859dce

Browse files
committed
new region move document
1 parent dde21d4 commit 9859dce

File tree

3 files changed

+196
-1
lines changed

3 files changed

+196
-1
lines changed

articles/azure-cache-for-redis/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156
href: cache-administration.md#schedule-updates
157157
- name: Configure redis-cli.exe access
158158
href: cache-how-to-redis-cli-tool.md
159+
- name: Move between regions
160+
href: cache-moving-resources.md
159161
- name: Publishing Azure Cache for Redis events
160162
href: cache-event-grid.md
161163
- name: Remove TLS 1.0 and 1.1
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
title: Move Azure Cache for Redis instances to different regions
3+
description: How to move Azure Cache for Redis instances to a different Azure region.
4+
author: curib
5+
ms.author: cauribeg
6+
ms.service: cache
7+
ms.topic: how-to
8+
ms.custom: subject-moving-resources
9+
ms.date: 8/27/2021
10+
#Customer intent: As an Azure developer, I want to move my Azure Cache for Redis resource to another Azure region.
11+
---
12+
13+
# Move Azure Cache for Redis instances to different regions
14+
15+
In this article, you will learn how to move Azure Cache for Redis instances to a different Azure region. You might move your resources to another region for a number of reasons:
16+
- To take advantage of a new Azure region.
17+
- To deploy features or services available in specific regions only.
18+
- To meet internal policy and governance requirements.
19+
- In response to capacity planning requirements.
20+
21+
Depending on which tier of Azure Cache for Redis you use will determine which option is best for you.
22+
23+
| Cache Tier | Options |
24+
| ------------ | ------- |
25+
| Premium | Geo-replication, create a new cache, dual-write to two caches, or export and import data via RDB file|
26+
| Basic or Standard | Create a new cache or dual-write to two caches|
27+
| Enterprise or Enterprise Flash | Create a new cache or export and import data via RDB file |
28+
29+
## Geo-replication (Premium)
30+
31+
### Prerequisites
32+
33+
To configure geo-replication between two caches, the following prerequisites must be met:
34+
35+
- Both caches are [Premium tier](cache-overview.md#service-tiers) caches.
36+
- Both caches are in the same Azure subscription.
37+
- The secondary linked cache is either the same cache size or a larger cache size than the primary linked cache.
38+
- Both caches are created and in a running state.
39+
40+
### Prepare
41+
42+
To move your cache instance to another region, you'll need to [create a second premium cache instance](quickstart-create-redis.md) in the desired region. Once both caches are in a running state, you can set up geo-replication between the two cache instances.
43+
44+
> [!NOTE]
45+
> Data transfer between Azure regions is charged at standard [bandwidth rates](https://azure.microsoft.com/pricing/details/bandwidth/).
46+
47+
Some features aren't supported with geo-replication:
48+
49+
- Zone Redundancy isn't supported with geo-replication.
50+
- Persistence isn't supported with geo-replication.
51+
- Clustering is supported if both caches have clustering enabled and have the same number of shards.
52+
- Caches in the same Virtual Network (VNet) are supported.
53+
- Caches in different VNets are supported with caveats. See [Can I use geo-replication with my caches in a VNet?](cache-how-to-geo-replication.md#can-i-use-geo-replication-with-my-caches-in-a-vnet) for more information.
54+
55+
After geo-replication is configured, the following restrictions apply to your linked cache pair:
56+
57+
- The secondary linked cache is read-only. You can read from it, but you can't write any data to it.
58+
- If you choose to read from the Geo-Secondary instance, note that whenever a full data sync is happening between the Geo-Primary and the Geo-Secondary (happens when either Geo-Primary or Geo-Secondary is updated and on some reboot scenarios as well), the Geo-Secondary instance throws errors (stating that a full data sync is in progress) on any Redis operation against it until the full data sync between Geo-Primary and Geo-Secondary is complete.
59+
- Applications reading from Geo-Secondary should be built to fall back to the Geo-Primary whenever the Geo-Secondary is throwing such errors.
60+
- Any data that was in the secondary linked cache before the link was added is removed. If the geo-replication is later removed however, the replicated data remains in the secondary linked cache.
61+
- You can't [scale](cache-how-to-scale.md) either cache while the caches are linked.
62+
- You can't [change the number of shards](cache-how-to-premium-clustering.md) if the cache has clustering enabled.
63+
- You can't enable persistence on either cache.
64+
- You can [Export](cache-how-to-import-export-data.md#export) from either cache.
65+
- You can't [Import](cache-how-to-import-export-data.md#import) into the secondary linked cache.
66+
- You can't delete either linked cache, or the resource group that contains them, until you unlink the caches. For more information, see [Why did the operation fail when I tried to delete my linked cache?](cache-how-to-geo-replication.md#why-did-the-operation-fail-when-i-tried-to-delete-my-linked-cache)
67+
- If the caches are in different regions, network egress costs apply to the data moved across regions. For more information, see [How much does it cost to replicate my data across Azure regions?](cache-how-to-geo-replication.md#how-much-does-it-cost-to-replicate-my-data-across-azure-regions)
68+
- Automatic failover doesn't occur between the primary and secondary linked cache. For more information and information on how to failover a client application, see [How does failing over to the secondary linked cache work?](cache-how-to-geo-replication.md#how-does-failing-over-to-the-secondary-linked-cache-work)
69+
70+
### Move
71+
72+
1. To link two caches together for geo-replication, fist click **Geo-replication** from the Resource menu of the cache that you intend to be the primary linked cache. Next, click **Add cache replication link** from **Geo-replication** on the left.
73+
74+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-menu.png" alt-text="Add link":::
75+
76+
1. Select the name of your intended secondary cache from the **Compatible caches** list. If your secondary cache isn't displayed in the list, verify that the [Geo-replication prerequisites](#prerequisites) for the secondary cache are met. To filter the caches by region, select the region in the map to display only those caches in the **Compatible caches** list.
77+
78+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-select-link.png" alt-text="Geo-replication compatible caches":::
79+
80+
You can also start the linking process or view details about the secondary cache by using the context menu.
81+
82+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-select-link-context-menu.png" alt-text="Geo-replication context menu":::
83+
84+
1. Select **Link** to link the two caches together and begin the replication process.
85+
86+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-confirm-link.png" alt-text="Link caches":::
87+
88+
### Verify
89+
90+
1. You can view the progress of the replication process using **Geo-replication** on the left.
91+
92+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-linking.png" alt-text="Linking status":::
93+
94+
You can also view the linking status on the left, using **Overview**, for both the primary and secondary caches.
95+
96+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-link-status.png" alt-text="Screenshot that highlights how to view the linking status for the primary and secondary caches.":::
97+
98+
Once the replication process is complete, the **Link status** changes to **Succeeded**.
99+
100+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-link-successful.png" alt-text="Cache status":::
101+
102+
The primary linked cache remains available for use during the linking process. The secondary linked cache isn't available until the linking process completes.
103+
104+
### Clean up source resources
105+
106+
Once your new cache in the targeted region is populated with all necessary data, you can remove the link between the two caches and delete the original instance.
107+
108+
1. To remove the link between two caches and stop geo-replication, click **Unlink caches** from the **Geo-replication** on the left .
109+
110+
:::image type="content" source="media/cache-how-to-geo-replication/cache-geo-location-unlink.png" alt-text="Unlink caches":::
111+
112+
When the unlinking process completes, the secondary cache is available for both reads and writes.
113+
114+
>[!NOTE]
115+
>When the geo-replication link is removed, the replicated data from the primary linked cache remains in the secondary cache.
116+
>
117+
>
118+
119+
2. Delete the original instance.
120+
121+
## Create a new cache (All tiers)
122+
123+
### Prerequisites
124+
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)
125+
126+
### Prepare
127+
If losing data isn't a concern, the easiest way to move regions is to create a new cache instance in the targeted region and connect your application to it. For example, if you use Redis as a look-aside cache of database records, you can easily rebuild the cache from scratch.
128+
129+
### Move
130+
131+
[!INCLUDE [redis-cache-create](includes/redis-cache-create.md)]
132+
133+
Finally, update your application to use the new instances.
134+
135+
### Clean up source resources
136+
Once your new cache in the targeted region is running, you can delete the original instance.
137+
138+
139+
## Export and import data via RDB file (Premium, Enterprise, Enterprise Flash)
140+
Open-source Redis defines a standard mechanism for taking a snapshot of a cache's in-memory dataset and saving it to a file. This file, called RDB, can be read by another Redis cache. [Azure Cache for Redis Premium and Enterprise](cache-overview.md#service-tiers) supports importing data into a cache instance via RDB files. You can use an RDB file to transfer data from an existing cache to Azure Cache for Redis.
141+
142+
> [!IMPORTANT]
143+
> RDB file format can change between Redis versions and may not maintain backward-compatibility. The Redis version of the cache you're exporting from should be equal or less than the version of your new cache instance.
144+
>
145+
146+
### Prerequisites
147+
- Both caches are [Premium tier or Enterprise tier](cache-overview.md#service-tiers) caches.
148+
- The second cache is either the same cache size or a larger cache size than the original cache.
149+
- The Redis version of the cache you're exporting from should be equal or less than the version of your new cache instance.
150+
151+
### Prepare
152+
To move your cache instance to another region, you'll need to create [a second premium cache instance](quickstart-create-redis.md) or [a second enterprise cache instance](quickstart-create-redis-enterprise.md) in the desired region.
153+
154+
### Move
155+
1. See [here](cache-how-to-import-export-data.md) for more information on how to import and export data in Azure Cache for Redis.
156+
157+
2. Update your application to use the new cache instance.
158+
159+
### Verify
160+
You can monitor the progress of the import operation by following the notifications from the Azure portal, or by viewing the events in the [audit log](../azure-monitor/essentials/activity-log.md).
161+
162+
### Clean up source resources
163+
Once your new cache in the targeted region is running, you can delete the original instance.
164+
165+
## Dual-write to two caches (Basic, Standard, and Premium)
166+
Rather than moving data directly between caches, you may use your application to write data to both an existing cache and a new one you're setting up. The application will still read data from the existing cache initially. When the new cache has the necessary data, you switch the application to that cache and retire the old one. Let's say, for example, you use Redis as a session store and the application sessions are valid for seven days. After writing to the two caches for a week, you'll be certain the new cache contains all non-expired session information. You can safely rely on it from that point onward without concern over data loss.
167+
168+
### Prerequisites
169+
- The second cache is either the same cache size or a larger cache size than the original cache.
170+
171+
### Prepare
172+
To move your cache instance to another region, you'll need to [create a second cache instance](quickstart-create-redis.md) in the desired region.
173+
174+
### Move
175+
General steps to implement this option are:
176+
177+
1. Modify application code to write to both the new and the original instances.
178+
179+
2. Continue reading data from the original instance until the new instance is sufficiently populated with data.
180+
181+
3. Update the application code to reading and writing from the new instance only.
182+
183+
### Clean up source resources
184+
Once your new cache in the targeted region is running, you can delete the original instance.
185+
186+
## Next steps
187+
188+
Learn more about Azure Cache for Redis features.
189+
- [Geo-replication FAQ](cache-how-to-geo-replication.md#geo-replication-faq)
190+
- [Azure Cache for Redis service tiers](cache-overview.md#service-tiers)
191+
- [High availability for Azure Cache for Redis](cache-high-availability.md)
192+
193+

articles/azure-cache-for-redis/cache-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The [Azure Cache for Redis Pricing](https://azure.microsoft.com/pricing/details/
6161
| [Data persistence](cache-how-to-premium-persistence.md) |-|-||Preview|Preview|
6262
| [Zone redundancy](cache-how-to-zone-redundancy.md) |-|-||||
6363
| [Geo-replication](cache-how-to-geo-replication.md) |-|-||Preview|Preview|
64-
| [Redis Modules](#choosing-the-right-tier) |-|-|-|||
64+
| [Redis Modules](#choosing-the-right-tier) |-|-|-||-|
6565
| [Import/Export](cache-how-to-import-export-data.md) |-|-||||
6666
| [Reboot](cache-administration.md#reboot) ||||-|-|
6767
| [Scheduled updates](cache-administration.md#schedule-updates) ||||-|-|

0 commit comments

Comments
 (0)