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: content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/_index.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,21 @@
1
1
---
2
-
title: Build hybrid AKS clusters with Arm nodes and nginx
3
-
4
-
draft: true
5
-
cascade:
6
-
draft: true
2
+
title: Build a multi-architecture Kubernetes cluster running nginx on Azure AKS
7
3
8
4
minutes_to_complete: 60
9
5
10
-
who_is_this_for: This Learning Path is for developers who want to understand nginx performance on x64 and arm64 deployments by running a hybrid Azure Kubernetes Service (AKS) cluster.
6
+
who_is_this_for: This is an introductory topic for developers who want to deploy multi-architecture Kubernetes workloads and compare nginx performance between x86 and Arm-based nodes in Azure Kubernetes Service (AKS) clusters.
11
7
12
8
learning_objectives:
13
-
- Create a hybrid AKS cluster with x64 and arm64 nodes
14
-
- Deploy nginx's multi-architecture container image, pods, and services to the AKS cluster
15
-
- Smoke test nginx from each architecture in the cluster to verify proper installation
16
-
- Test the performance of each architecture in the cluster
17
-
- Apply the same process to other kubernetes workloads
9
+
- Create a hybrid AKS cluster with both x86 and Arm64 nodes
10
+
- Deploy nginx using multi-architecture container images across different node types
11
+
- Verify nginx deployment and functionality on each architecture
12
+
- Compare performance between x86 and Arm64 nginx instances
13
+
- Learn techniques for deploying multi-architecture Kubernetes workloads
18
14
19
15
20
16
prerequisites:
21
-
- An [Azure account](https://azure.microsoft.com/en-us/free/).
22
-
- A local machine with [jq](https://jqlang.org/download/), [curl](https://curl.se/download.html), [wrk](https://github.com/wg/wrk), [Azure CLI](/install-guides/azure-cli/) and [kubectl](/install-guides/kubectl/) installed.
17
+
- An [Azure account](https://azure.microsoft.com/en-us/free/)
18
+
- A local machine with [`jq`](https://jqlang.org/download/), [`curl`](https://curl.se/download.html), [`wrk`](https://github.com/wg/wrk), [Azure CLI](/install-guides/azure-cli/), and [`kubectl`](/install-guides/kubectl/) installed
23
19
24
20
author:
25
21
- Geremy Cohen
@@ -39,22 +35,28 @@ operatingsystems:
39
35
tools_software_languages:
40
36
- nginx
41
37
- Web Server
38
+
- Azure
39
+
- Kubernetes
42
40
43
41
further_reading:
44
42
- resource:
45
-
title: nginx - High Performance Load Balancer, Web Server, & Reverse Proxy
43
+
title: nginx website
46
44
link: https://nginx.org/
47
-
type: documentation
45
+
type: website
48
46
- resource:
49
-
title: nginx Docker Hub
47
+
title: nginx on Docker Hub
50
48
link: https://hub.docker.com/_/nginx
51
49
type: documentation
52
50
- resource:
53
51
title: Azure Kubernetes Service (AKS) documentation
54
52
link: https://docs.microsoft.com/en-us/azure/aks/
55
53
type: documentation
56
54
- resource:
57
-
title: Learn how to tune Nginx
55
+
title: Learn how to deploy nginx [Arm Learning Path]
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/apply-configuration.md
+40-36Lines changed: 40 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,22 @@
1
1
---
2
2
title: Monitor performance with wrk and btop
3
-
weight: 70
3
+
weight: 9
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
9
## Install btop monitoring tool on nginx pods
10
10
11
-
Now that you have all your nginx deployments running across Intel and Arm architectures, you can monitor performance across each architecture using wrk to generate load and btop to monitor system performance.
11
+
Now that you have all your nginx deployments running across Intel and Arm architectures, you can monitor performance across each architecture using `wrk` to generate load and `btop` to monitor system performance.
12
12
13
13
{{% notice Note %}}
14
-
This tutorial uses [wrk](https://github.com/wg/wrk) to generate load, which is readily available on apt and brew package managers. [wrk2](https://github.com/giltene/wrk2) is a modern fork of wrk with additional features. wrk was chosen for this tutorial due to its ease of installation, but if you prefer to install and use wrk2 (or other http load generators) for your testing, feel free to do so.
15
-
{{% /notice %}}
16
-
17
-
### Install btop and apply optimized configuration
14
+
This Learning Path uses [`wrk`](https://github.com/wg/wrk) to generate HTTP load testing. You can easily install `wrk` using `apt` or `brew` package managers.
18
15
19
-
The `nginx_util.sh` script includes a `put config` command that will:
16
+
If you prefer alternatives like [`wrk2`](https://github.com/giltene/wrk2) (a modern fork with additional features) or other HTTP load generators, you can use those instead.
17
+
{{% /notice %}}
20
18
21
-
- Apply a performance-optimized nginx configuration to all pods
22
-
- Install btop monitoring tool on all pods for system monitoring
23
-
- Restart pods with the new configuration
19
+
## Install btop and apply optimized configuration
24
20
25
21
Run the following command to apply the configuration updates:
26
22
@@ -41,7 +37,14 @@ Installing btop on nginx-intel-deployment-6f5bff9667-zdrqc...
41
37
✅ btop installed on all pods!
42
38
```
43
39
44
-
### Check pod restart status
40
+
The `nginx_util.sh` script includes a `put config` command that:
41
+
42
+
- Applies a performance-optimized nginx configuration to all pods
43
+
- Installs `btop` monitoring tool on all pods for system monitoring
44
+
- Restarts pods with the new configuration
45
+
46
+
47
+
## Check pod restart status
45
48
46
49
Check that all pods have restarted with the new configuration:
47
50
@@ -52,26 +55,26 @@ kubectl get pods -n nginx
52
55
You should see all pods with recent restart times.
53
56
54
57
{{% notice Note %}}
55
-
Because pods are ephemeral, btop will need to be reinstalled if the pods are deleted or restarted. If you get an error saying btop is not found, rerun the `./nginx_util.sh put btop`command to reinstall it.
58
+
Because pods are ephemeral, you need to reinstall `btop` if pods restart or get deleted. If you see a "btop not found" error, run `./nginx_util.sh put btop`again to reinstall it.
56
59
{{% /notice %}}
57
60
58
61
59
-
### Set up real-time performance monitoring
60
-
61
-
You can now log in to any pod and use btop to monitor system performance. There are many variables that can affect an individual workload's performance, and btop (like top) is a great first step in understanding those variables.
62
+
## Set up real-time performance monitoring
63
+
You can now log in to any pod and monitor system performance with `btop`. Many factors can affect workload performance, and `btop` (like `top`) is an excellent starting point for understanding these metrics.
62
64
63
65
{{% notice Note %}}
64
-
When performing load generation tests from your laptop, local system and network settings may interfere with proper load generation between your machine and the remote cluster services. To mitigate these issues, it's suggested to install the `nginx_util.sh` script on a [remote Azure instance](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/azure/) in the same region and zone as your K8s cluster for best results. If you aren't seeing at least 70K+ requests/s to either K8s service endpoint, switching to a better located system is advised.
65
-
{{% /notice %}}
66
+
Network performance can impact load testing accuracy when running from your local machine. If you experience low request rates (under 70,000 requests/s), consider running the test from an Azure VM in the same region as your cluster.
67
+
68
+
You can create an [Azure VM instance](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/azure/) and install the `nginx_util.sh` script there for more reliable results.{{% /notice %}}
66
69
67
70
Running two btop terminals, one for each pod, is a convenient way to view performance in real time.
68
71
69
-
To bring up btop on both Arm and Intel pods:
72
+
To bring up btop on both Arm and Intel pods, follow these steps:
70
73
71
-
1. Open two new terminal windows
72
-
2. In one terminal, run `login arm` from the nginx utility script to enter the pod
73
-
3. In the second terminal, run `login intel` from the nginx utility script to enter the pod
74
-
4. Once inside each pod, run btop to see real-time system monitoring
74
+
- Open two new terminal windows
75
+
- In one terminal, run `login arm` from the nginx utility script to enter the pod
76
+
- In the second terminal, run `login intel` from the `nginx` utility script to enter the pod
77
+
- Once inside each pod, run `btop` to see real-time system monitoring
75
78
76
79
The commands are shown below.
77
80
@@ -95,25 +98,28 @@ btop --utf-force
95
98
96
99
You should now see something similar to the image below, with one terminal for each Arm and Intel pod running btop:
97
100
98
-

101
+

99
102
100
-
To visualize performance with btop against the Arm and Intel pods via the load balancer service endpoints, you can use the `nginx_util.sh` wrapper to generate load to both simultaneously:
103
+
To visualize performance with btop against the Arm and Intel pods using the load balancer service endpoints, you can use the `nginx_util.sh` wrapper to generate load to both simultaneously:
101
104
102
105
```bash
103
106
./nginx_util.sh wrk both
104
107
```
105
108
106
-
This runs wrk with predefined settings (1 thread, 50 simultaneous connections) to generate load to the K8s architecture-specific endpoints.
109
+
This runs `wrk` with predefined settings (1 thread, 50 simultaneous connections) to generate load to the K8s architecture-specific endpoints.
107
110
108
-
While it runs (for a default of 30s), you can observe some performance characteristics from the btop outputs:
111
+
While it runs (for a default of 30s), you can observe some performance characteristics from the `btop` outputs:
109
112
110
-

113
+

111
114
112
-
Of particular interest is memory and CPU resource usage per pod. For Intel, red marker 1 shows memory usage for the process, and red marker 2 shows total CPU usage.
115
+
You can observe several performance characteristics from the btop outputs during load testing. Pay attention to the memory and CPU resource usage for each pod:
113
116
114
-
Red markers 3 and 4 show the same metrics for Arm.
117
+
- Intel pod metrics: Memory usage (marker 1) and total CPU usage (marker 2)
118
+
- Arm pod metrics: Memory usage (marker 3) and total CPU usage (marker 4)
115
119
116
-

120
+
These real-time metrics help you compare how each architecture handles the load and resource consumption patterns.
121
+
122
+

117
123
118
124
In addition to the visual metrics, the script also returns runtime results including requests per second and latencies:
119
125
@@ -169,15 +175,13 @@ For example, to generate load using 500 connections across 4 threads to the Arm
169
175
wrk -t4 -c500 -d300 http://20.252.73.72/
170
176
```
171
177
172
-
## Next Steps
173
-
174
-
You have learned how to run a sample nginx workload on a dual-architecture (Arm and Intel) Azure Kubernetes Service.
178
+
## What you've accomplished and what's next
175
179
176
-
You learned how to generate load with the wrk utility and monitor runtime metrics with btop.
180
+
You have successfully deployed and monitored `nginx` workloads across both Arm and Intel architectures on Azure Kubernetes Service. You've learned how to generate load with `wrk`, monitor real-time performance with `btop`, and compare performance characteristics between different architectures.
177
181
178
-
Here are some ideas for further exploration:
182
+
You now have the knowledge to experiment with your own workloads on Arm-based AKS nodes to identify performance and efficiency opportunities unique to your own environments. Here are some ideas for further exploration:
179
183
180
184
* What do the performance curves look like between the two architectures as a function of load?
181
185
* How do larger instance types scale versus smaller ones?
182
186
183
-
You now have the knowledge to experiment with your own workloads on Arm-based AKS nodes to identify performance and efficiency opportunities unique to your own environments.
187
+
Congratulations on completing this Learning Path! You've built a solid foundation for deploying and optimizing multi-architecture Kubernetes workloads on Azure, positioning yourself to take full advantage of Arm's performance and cost benefits in your cloud infrastructure.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/create-test-utility.md
+20-14Lines changed: 20 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,40 @@
1
1
---
2
2
title: Create the test utility
3
-
weight: 20
3
+
weight: 4
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Test utility script
9
+
## Understand the utility script’s purpose
10
10
11
-
In this section, you'll create a utility script to test and manage your nginx services across both architectures. The script will be used throughout the Learning Path to test services, apply configurations, and access pods.
11
+
In this section, you'll create a utility script that simplifies working with your multi-architecture Kubernetes deployment. This script acts as a convenient wrapper around common kubectl and testing commands, making it easier to interact with nginx pods across different architectures.
12
12
13
-
### Script functionality
13
+
Instead of typing long kubectl commands repeatedly, you'll use this utility to quickly test services, monitor performance, and access pods on both Arm and Intel nodes. This approach saves time and reduces errors, especially when comparing behavior across architectures.
14
14
15
-
The `nginx_util.sh` script provides three main functions:
15
+
By the end of this section, you'll have a ready-to-use tool that streamlines the testing and monitoring tasks you'll perform throughout the rest of this Learning Path.
16
16
17
-
-**`curl intel|arm|multiarch`** - Test nginx services and show which pod served the request
18
-
-**`put btop`** - Install btop monitoring tool on all pods
19
-
-**`login intel|arm`** - Interactive bash access to architecture-specific pods
17
+
## Get to know the utility script
18
+
The utility script provides three main functions to help you work with your multi-architecture nginx deployment. You can use it to test services across different architectures, monitor performance, and access pods directly.
19
+
20
+
The script provides the following key commands to interact with your nginx deployment:
21
+
22
+
-`curl intel|arm|multiarch` tests nginx services and show which pod served the request
23
+
-`put btop` installs btop monitoring tool on all pods
24
+
-`login intel|arm` is an interactive bash access to architecture-specific pods
25
+
26
+
These commands streamline common tasks you'll perform when working with multi-architecture deployments. The `curl` command helps you verify that requests are being properly distributed across different architectures, while the `login` command gives you direct access to pods for debugging or configuration changes.
20
27
21
28
The script conveniently bundles test and logging commands into a single place, making it easy to test, troubleshoot, and view services.
22
29
23
-
###Download the utility script
30
+
## Download the utility script
24
31
25
32
{{% notice Note %}}
26
33
The following utility `nginx_util.sh` is provided for your convenience.
27
34
28
-
It's a wrapper for kubectl and other commands, utilizing [curl](https://curl.se/). Make sure you have curl installed before running.
35
+
It's a wrapper for `kubectl` and other commands, utilizing [curl](https://curl.se/). Make sure you have curl installed before running.
29
36
30
-
You can click on the link below to review the code before downloading.
37
+
You can review the code before downloading by visiting the [GitHub repository](https://raw.githubusercontent.com/geremyCohen/nginxOnAKS/refs/heads/main/nginx_util.sh).
31
38
{{% /notice %}}
32
39
33
40
Copy and paste the following commands into a terminal to download and create the `nginx_util.sh` script:
0 commit comments