Skip to content

Commit 980696e

Browse files
authored
Merge pull request #3122 from odidev/redis_cobalt
Deploy Redis on Azure Cobalt 100 Arm64 virtual machines for real-time messaging and event processing
2 parents b71a7a1 + 4acba51 commit 980696e

11 files changed

Lines changed: 660 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Deploy Redis on Azure Cobalt 100 Arm64 virtual machines for real-time messaging and event processing
3+
4+
draft: true
5+
cascade:
6+
draft: true
7+
8+
minutes_to_complete: 30
9+
10+
who_is_this_for: This is an introductory topic for developers, DevOps engineers, and platform engineers who want to build real-time messaging systems and event-driven applications using Redis on Arm-based cloud environments.
11+
12+
learning_objectives:
13+
- Install and configure Redis on Azure Cobalt 100 Arm64 virtual machines
14+
- Implement real-time messaging using Redis Pub/Sub
15+
- Build event-driven pipelines using Redis Streams and consumer groups
16+
- Benchmark Redis performance and validate throughput and latency on Arm
17+
18+
prerequisites:
19+
- A [Microsoft Azure account](https://azure.microsoft.com/) with access to Cobalt 100 based instances (Dpsv6)
20+
- Basic knowledge of Linux command-line operations
21+
- Familiarity with SSH and remote server access
22+
- Basic understanding of databases, caching, and messaging systems
23+
24+
author: Pareena Verma
25+
26+
### Tags
27+
skilllevels: Introductory
28+
subjects: Databases
29+
cloud_service_providers:
30+
- Microsoft Azure
31+
32+
armips:
33+
- Neoverse
34+
35+
tools_software_languages:
36+
- Redis
37+
- Python
38+
39+
operatingsystems:
40+
- Linux
41+
42+
further_reading:
43+
- resource:
44+
title: Redis Official Website
45+
link: https://redis.io
46+
type: website
47+
- resource:
48+
title: Redis Documentation
49+
link: https://redis.io/docs/
50+
type: documentation
51+
- resource:
52+
title: Redis Streams Introduction
53+
link: https://redis.io/docs/data-types/streams/
54+
type: documentation
55+
- resource:
56+
title: Azure Cobalt 100 processors
57+
link: https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353
58+
type: documentation
59+
60+
### FIXED, DO NOT MODIFY
61+
# ================================================================================
62+
weight: 1
63+
layout: "learningpathall"
64+
learning_path_main_page: "yes"
65+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Overview of Azure Cobalt 100 and Redis"
3+
4+
weight: 2
5+
6+
layout: "learningpathall"
7+
---
8+
9+
## Azure Cobalt 100 Arm-based processor
10+
11+
Azure’s Cobalt 100 is Microsoft’s first-generation, in-house Arm-based processor. Built on Arm Neoverse N2, Cobalt 100 is a 64-bit CPU that delivers strong performance and energy efficiency for cloud-native, scale-out Linux workloads such as web and application servers, data analytics, open-source databases, and caching systems. Running at 3.4 GHz, Cobalt 100 allocates a dedicated physical core for each vCPU, which helps ensure consistent and predictable performance.
12+
13+
To learn more, see the Microsoft blog [Announcing the preview of new Azure VMs based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).
14+
15+
## Redis
16+
17+
Redis is an open-source, in-memory data structure store used as a database, cache, and message broker. It is widely adopted for building high-performance, low-latency applications such as real-time analytics, caching layers, session stores, and event-driven systems.
18+
19+
Redis supports multiple data structures, including strings, hashes, lists, sets, sorted sets, and streams, enabling flexible application design. Its in-memory architecture allows it to deliver sub-millisecond latency and high throughput, making it ideal for modern cloud-native workloads.
20+
21+
To learn more, see the official [Redis documentation](https://redis.io/docs/).
22+
23+
Redis also provides built-in support for real-time messaging and event processing through:
24+
25+
- **Pub/Sub (Publish/Subscribe):** Enables real-time communication between producers and consumers without message persistence. It is commonly used for chat systems, notifications, and live updates.
26+
27+
- **Redis Streams:** A persistent data structure designed for event-driven architectures. Streams allow message storage, replay, and consumer group-based processing for scalable and reliable event pipelines.
28+
29+
- **Consumer Groups:** A feature of Redis Streams that enables distributed processing by multiple consumers, ensuring scalability and fault tolerance in production systems.
30+
31+
Redis is commonly used in:
32+
33+
- Real-time messaging systems
34+
- Event-driven microservices architectures
35+
- Data ingestion and streaming pipelines
36+
- Caching and session management
37+
- High-performance APIs
38+
39+
In this Learning Path, you'll deploy Redis on an Azure Cobalt 100 Arm64 virtual machine and build a real-time messaging and event processing system using Pub/Sub and Redis Streams. You will also benchmark Redis performance to validate its efficiency on Arm-based infrastructure.
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
title: Deploy Redis on Azure Cobalt 100
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Deploy Redis on Azure Cobalt 100 (Arm)
10+
11+
This section guides you through installing Redis on an Azure Cobalt 100 Arm-based virtual machine and building a real-time messaging and event processing system using Redis Pub/Sub and Streams.
12+
13+
You will implement low-latency messaging and event-driven pipelines optimized for Arm-based infrastructure.
14+
15+
## Update your system
16+
17+
Update your operating system packages to the latest versions:
18+
19+
```console
20+
sudo apt update && sudo apt upgrade -y
21+
```
22+
23+
## Install required dependencies
24+
25+
Install build tools and utilities required to compile and run Redis:
26+
27+
```bash
28+
sudo apt install -y build-essential tcl git curl python3-pip
29+
```
30+
31+
## Download and install Redis
32+
33+
Download the latest Redis source code and compile it:
34+
35+
```bash
36+
cd /tmp
37+
curl -O http://download.redis.io/redis-stable.tar.gz
38+
tar xzf redis-stable.tar.gz
39+
cd redis-stable
40+
make -j$(nproc)
41+
```
42+
43+
(Optional) Run tests to validate the build:
44+
45+
```bash
46+
make test
47+
```
48+
49+
## Start the Redis server
50+
51+
Start the Redis server in a new terminal.
52+
53+
**Terminal 1:**
54+
55+
```bash
56+
cd /tmp/redis-stable
57+
src/redis-server
58+
```
59+
60+
The output shows Redis starting successfully and listening on port 6379.
61+
62+
## Verify Redis is running
63+
64+
Open another terminal and connect using the Redis CLI.
65+
66+
**Terminal 2:**
67+
68+
```bash
69+
cd /tmp/redis-stable
70+
src/redis-cli
71+
PING
72+
```
73+
74+
The output is similar to:
75+
```output
76+
127.0.0.1:6379> ping
77+
PONG
78+
```
79+
80+
This confirms that Redis is running and accepting connections.
81+
82+
## Implement real-time messaging using Pub/Sub
83+
84+
Redis Pub/Sub enables real-time communication between producers and consumers.
85+
86+
**Terminal 2 (Subscriber):**
87+
88+
```bash
89+
SUBSCRIBE chat_channel
90+
```
91+
92+
The output is similar to:
93+
94+
```output
95+
127.0.0.1:6379> SUBSCRIBE chat_channel
96+
1) "subscribe"
97+
2) "chat_channel"
98+
3) (integer) 1
99+
1) "message"
100+
2) "chat_channel"
101+
```
102+
103+
**Terminal 3 (Publisher):**
104+
105+
```bash
106+
cd /tmp/redis-stable
107+
src/redis-cli
108+
PUBLISH chat_channel "Hello from Cobalt Arm!"
109+
```
110+
111+
After publishing the message, switch back to the subscriber terminal.
112+
113+
The output is similar to:
114+
115+
```output
116+
1) "subscribe"
117+
2) "chat_channel"
118+
3) (integer) 1
119+
1) "message"
120+
2) "chat_channel"
121+
3) "Hello from Cobalt Arm!"
122+
```
123+
124+
This demonstrates real-time message delivery.
125+
126+
## Build an event pipeline using Redis Streams
127+
128+
Redis Streams provide persistent messaging with replay capability.
129+
130+
**Terminal 3 (Producer):**
131+
132+
```bash
133+
XADD mystream * user jack action login
134+
XADD mystream * user yan action purchase
135+
```
136+
137+
The output is similar to:
138+
```output
139+
127.0.0.1:6379> XADD mystream * user jack action login
140+
"1774931844279-0"
141+
127.0.0.1:6379> XADD mystream * user yan action purchase
142+
"1774931858864-0"
143+
```
144+
145+
**Terminal 2 (Consumer):**
146+
147+
```bash
148+
XREAD COUNT 2 STREAMS mystream 0
149+
```
150+
151+
The output is similar to:
152+
```output
153+
1) 1) "mystream"
154+
2) 1) 1) "1774931844279-0"
155+
2) 1) "user"
156+
2) "jack"
157+
3) "action"
158+
4) "login"
159+
2) 1) "1774931858864-0"
160+
2) 1) "user"
161+
2) "yan"
162+
3) "action"
163+
4) "purchase"
164+
```
165+
166+
This confirms that events are stored and can be read reliably.
167+
168+
## Key differences between Pub/Sub and Streams
169+
170+
- Pub/Sub delivers messages in real time but does not store them
171+
- Streams persist messages and allow replay
172+
- Streams support consumer groups for scalability
173+
174+
## What you've learned and what's next
175+
You have successfully:
176+
177+
- Installed Redis on an Arm-based Cobalt 100 VM
178+
- Verified Redis connectivity
179+
- Implemented real-time messaging using Pub/Sub
180+
- Built an event-driven pipeline using Redis Streams
181+
182+
You are now ready to extend this setup with consumer groups, application integration, and performance benchmarking.
38.8 KB
Loading
68.7 KB
Loading
84 KB
Loading
105 KB
Loading
106 KB
Loading
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Create an Azure Cobalt 100 Arm64 virtual machine
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Prerequisites and setup
10+
11+
There are several common ways to create an Arm-based Cobalt 100 virtual machine, and you can choose the method that best fits your workflow or requirements:
12+
13+
- The Azure Portal
14+
- The Azure CLI
15+
- An infrastructure as code (IaC) tool
16+
17+
In this section, you'll launch the Azure Portal to create a virtual machine with the Arm-based Azure Cobalt 100 processor.
18+
19+
This Learning Path focuses on general-purpose virtual machines in the Dpsv6 series. For more information, see the [Microsoft Azure guide for the Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series).
20+
21+
While the steps to create this instance are included here for convenience, you can also refer to the [Deploy a Cobalt 100 virtual machine on Azure Learning Path](/learning-paths/servers-and-cloud-computing/cobalt/).
22+
23+
## Create an Arm-based Azure virtual machine
24+
25+
Creating a virtual machine based on Azure Cobalt 100 is no different from creating any other virtual machine in Azure. To create an Azure virtual machine:
26+
27+
- Launch the Azure portal and navigate to **Virtual Machines**.
28+
- Select **Create**, and select **Virtual Machine** from the drop-down list.
29+
- Inside the **Basic** tab, fill in the instance details such as **Virtual machine name** and **Region**.
30+
- Select the image for your virtual machine (for example, Ubuntu Pro 24.04 LTS) and select **Arm64** as the VM architecture.
31+
- In the **Size** field, select **See all sizes** and select the D-Series v6 family of virtual machines.
32+
- Select **D4ps_v6** from the list as shown in the diagram below:
33+
34+
![Azure Portal showing D-Series v6 VM size selection with D4ps_v6 highlighted alt-txt#center](images/instance.png "Select D4ps_v6 from the D-Series v6 family")
35+
36+
- For **Authentication type**, select **SSH public key**.
37+
38+
{{% notice Note %}}
39+
Azure generates an SSH key pair for you and lets you save it for future use. This method is fast, secure, and easy for connecting to your virtual machine.
40+
{{% /notice %}}
41+
42+
- Fill in the **Administrator username** for your VM.
43+
- Select **Generate new key pair**, and select **RSA SSH Format** as the SSH Key Type.
44+
45+
{{% notice Note %}}
46+
RSA offers better security with keys longer than 3072 bits.
47+
{{% /notice %}}
48+
49+
- Give your SSH key a key pair name.
50+
- In the **Inbound port rules**, select **HTTP (80)** and **SSH (22)** as the inbound ports, as shown below:
51+
52+
![Azure Portal showing inbound port rules with HTTP (80) and SSH (22) selected alt-txt#center](images/instance1.png "Configure inbound port rules for HTTP and SSH access")
53+
54+
- Now select the **Review + Create** tab and review the configuration for your virtual machine. It should look like the following:
55+
56+
![Azure Portal Review + Create tab showing VM configuration summary ready for deployment alt-txt#center](images/ubuntu-pro.png "Review VM configuration before creation")
57+
58+
- When you're happy with your selection, select the **Create** button and then **Download Private key and Create Resource** button.
59+
60+
![Azure Portal showing Create button and SSH key download dialog alt-txt#center](images/instance4.png "Download SSH key and create the virtual machine")
61+
62+
Your virtual machine should be ready and running in a few minutes. You can SSH into the virtual machine using the private key, along with the public IP details.
63+
64+
![Azure Portal showing successful VM deployment with confirmation details alt-txt#center](images/final-vm.png "Successful VM deployment confirmation")
65+
66+
{{% notice Note %}}To learn more about Arm-based virtual machines in Azure, see "Getting Started with Microsoft Azure" in [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/azure/).{{% /notice %}}
67+
68+
## What you've learned and what's next
69+
70+
You've created an Azure Cobalt 100 Arm64 virtual machine running Ubuntu 24.04 LTS with SSH authentication configured. The virtual machine is now ready for installing and running Redis workloads.
71+
72+
Next, you'll install Redis on the VM and begin building a real-time messaging and event processing system using Pub/Sub and Redis Streams.

0 commit comments

Comments
 (0)