Skip to content

Commit 6ff5084

Browse files
committed
First pass content fixes
1 parent dfe6d35 commit 6ff5084

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

articles/azure-cache-for-redis/cache-tutorial-active-replication.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: 'Tutorial: Get started with leveraging Azure Cache for Redis Enterprise active replication with your AKS hosted application'
2+
title: 'Tutorial: Get started with leveraging Azure Cache for Redis Enterprise active replication with an AKS-hosted application'
33
description: In this tutorial, you learn how to connect your AKS hosted application to Azure Cache for Redis Enterprise instances and leverage active geo-replication.
44
author: flang-msft
55

66
ms.author: franlanglois
77
ms.service: cache
88
ms.topic: tutorial
9-
ms.date: 09/07/2023
9+
ms.date: 09/18/2023
1010
#CustomerIntent: As a developer, I want to see how to use a Azure Cache for Redis Enterprise instance with an AKS container so that I see how I can use my cache instance with a Kubernetes cluster.
1111

1212
---
@@ -15,10 +15,6 @@ ms.date: 09/07/2023
1515

1616
In this tutorial, you will host a simple inventory application on AKS and find out how you can leverage active geo-replication to replicate data in your Azure Cache for Redis Enterprise instances across Azure regions.
1717

18-
## Overview
19-
This tutorial uses a sample inventory page which shows three different T-shirt options. The user can "purchase" each T-shirt and see the inventory drop. The unique thing about this demo is that we run the inventory app in two different regions. Typically, you would have to run the database storing inventory data in a single region so that there are no consistency issues. That can result in unpleasant customer experience due to higher latency for calls across different Azure regions. By using Azure Cache for Redis Enterprise as the backend, however, you can link two caches together with active geo-replication so that the inventory remains consistent across both regions while enjoying low latency performance from Redis Enterprise in the same region.
20-
21-
2218
## Prerequisites
2319

2420
- An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
@@ -27,26 +23,33 @@ This tutorial uses a sample inventory page which shows three different T-shirt o
2723
> [!IMPORTANT]
2824
> This tutorial assumes that you are familiar with basic Kubernetes concepts like containers, pods and service.
2925
26+
## Overview
27+
28+
This tutorial uses a sample inventory page which shows three different T-shirt options. The user can "purchase" each T-shirt and see the inventory drop. The unique thing about this demo is that we run the inventory app in two different regions. Typically, you would have to run the database storing inventory data in a single region so that there are no consistency issues. That can result in unpleasant customer experience due to higher latency for calls across different Azure regions. By using Azure Cache for Redis Enterprise as the backend, however, you can link two caches together with active geo-replication so that the inventory remains consistent across both regions while enjoying low latency performance from Redis Enterprise in the same region.
29+
3030
## Set up an Azure Cache for Redis instance
3131

32-
1. Create a new Azure Cache for Redis Enterprise instance in **West US 2** region by using the Azure portal or your preferred CLI tool. Alternately, you can use any region of your choice. Use the [quickstart guide](quickstart-create-redis-enterprise.md) to get started.
33-
1. On the **Advanced** tab,
34-
* enable **Non-TLS access only**
35-
* set **Clustering Policy** to Enterprise
36-
* set up active geo-replication using [this guide](cache-how-to-active-geo-replication.md)
32+
1. Create a new Azure Cache for Redis Enterprise instance in **West US 2** region by using the Azure portal or your preferred CLI tool. Alternately, you can use any region of your choice. Use the [quickstart guide](quickstart-create-redis-enterprise.md) to get started.
33+
34+
1. On the **Advanced** tab:
35+
36+
- Enable **Non-TLS access only**.
37+
- set **Clustering Policy** to Enterprise
38+
- set up active geo-replication using [this guide](cache-how-to-active-geo-replication.md)
3739

3840
> [!IMPORTANT]
3941
> This tutorial uses a non-TLS port for demonstration, but we highly recommend that you use a TLS port for anything in production.
4042
41-
3. Set up another Azure Cache for Redis Enterprise in **East US** region with the exact same configuration as the first cache. Alternately, you can use any region of your choice. Ensure that you choose the same replication group as the first cache.
43+
1. Set up another Azure Cache for Redis Enterprise in **East US** region with the exact same configuration as the first cache. Alternately, you can use any region of your choice. Ensure that you choose the same replication group as the first cache.
4244

4345
## Prepare Kubernetes deployment files
4446

45-
To demonstrate data replication across regions, we will run two instances of the same application in different regions. Let's assume one instance runs in Seattle (west) while the second in New York(east).
47+
To demonstrate data replication across regions, we will run two instances of the same application in different regions. Let's assume one instance runs in Seattle (west) while the second in New York (east).
4648

4749
Update the following fields in the YAML file below and save it as app_west.yaml
48-
* Update environment variables REDIS_HOST and REDIS_PASSWORD with hostname and access key of your Azure Cache for Redis Enterprise instance in West US 2 or one of the two regions your chose earlier.
49-
* Update APP_LOCATION to display the region where this application instance is running. In this sample, we are configuring the APP_LOCATION to Seattle to indicate this application instance is running in Seattle.
50+
51+
- Update environment variables REDIS_HOST and REDIS_PASSWORD with hostname and access key of your Azure Cache for Redis Enterprise instance in West US 2 or one of the two regions your chose earlier.
52+
- Update APP_LOCATION to display the region where this application instance is running. In this sample, we are configuring the APP_LOCATION to Seattle to indicate this application instance is running in Seattle.
5053

5154
```YAML
5255
apiVersion: apps/v1
@@ -112,6 +115,7 @@ Use the Kubernetes CLI, _kubectl_ , to connect to the Kubernetes cluster from yo
112115
```bash
113116
az aks install-cli
114117
```
118+
115119
If you use Azure Cloud Shell, _kubectl_ is already installed, and you can skip this step.
116120

117121
### Connect to your AKS cluster
@@ -145,7 +149,7 @@ Run the following command to deploy the application instance to your AKS cluster
145149
kubectl apply -f app_west.yaml
146150
```
147151

148-
You will get a response indicating your deployment and service was created:
152+
You get a response indicating your deployment and service was created:
149153

150154
```output
151155
deployment.apps/shoppingcart-app created
@@ -166,6 +170,7 @@ shoppingcart-app-5fffdcb5cd-48bl5 1/1 Running 0
166170
```
167171

168172
Run the following command to get the endpoint for your application:
173+
169174
```bash
170175
kubectl get service -n west
171176
```
@@ -178,7 +183,8 @@ shoppingcart-svc LoadBalancer 10.0.166.147 20.69.136.105 80:30390/TC
178183
```
179184

180185
Once the External-IP is available, open a web browser to the External-IP address of your service and you see the application running like below:
181-
<screenshot for Seattle>
186+
187+
<!-- <screenshot for Seattle> -->
182188

183189
Run the same deployment steps and deploy an instance of the demo application to run in East US region.
184190

@@ -189,10 +195,12 @@ kubectl get pods -n east
189195

190196
kubectl get service -n east
191197
```
198+
192199
With two services opened in your browser, you should see that changing the inventory in one region is virtually instantly reflected in the other region. The inventory data is stored in the Redis Enterprise instances which are replicating data across regions.
193200

194-
You did it! Click on the buttons and explore the demo. To reset the count, add "/reset" after the url. e.g. <IP address>/reset
201+
You did it! Click on the buttons and explore the demo. To reset the count, add `/reset` after the url:
195202

203+
`<IP address>/reset`
196204

197205
## Clean up your deployment
198206

@@ -208,6 +216,7 @@ kubectl delete service shoppingcart-svc -n east
208216
[!INCLUDE [cache-delete-resource-group](includes/cache-delete-resource-group.md)]
209217

210218
## Related Content
211-
<!-- Do we want this particular link in this section.
212219

213-
- [Use Azure Key Vault Provider to securely store your access key](https://learn.microsoft.com/azure/aks/csi-secrets-store-driver) -->
220+
-
221+
- [Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using the Azure portal](/azure/aks/learn/quick-kubernetes-deploy-portal)
222+
- [AKS sample voting application](https://github.com/Azure-Samples/azure-voting-app-redis/tree/master)

0 commit comments

Comments
 (0)