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
Fix Acrolinx issues. Also, revert to using Hello World public container image instead of forking Albums API Github repo, on input from product team at 20230808 meeting.
Copy file name to clipboardExpand all lines: articles/container-apps/tutorial-scaling.md
+17-27Lines changed: 17 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: 'Tutorial: Scale a container app'
3
-
description: Scale a Azure Container Apps application using the Azure CLI.
3
+
description: Scale an Azure Container Apps application using the Azure CLI.
4
4
services: container-apps
5
5
author: v-jaswel
6
6
ms.service: container-apps
@@ -21,7 +21,7 @@ In this tutorial, you add an HTTP scale rule to your container app and observe h
21
21
22
22
| Requirement | Instructions |
23
23
|--|--|
24
-
| Azure account | If you don't have an Azure account, you can [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). <br><br>You need the *User Access Administrator* or *Owner* permission on the Azure subscription to proceed. Refer to [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md?tabs=current) for details. |
24
+
| Azure account | If you don't have an Azure account, you can [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). <br><br>You need the *Contributor* permission on the Azure subscription to proceed. Refer to [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md?tabs=current) for details. |
25
25
| GitHub Account | Get one for [free](https://github.com/join). |
26
26
| Azure CLI | Install the [Azure CLI](/cli/azure/install-azure-cli). |
27
27
@@ -100,12 +100,6 @@ az provider register --namespace Microsoft.OperationalInsights
100
100
101
101
---
102
102
103
-
## Prepare the GitHub repository
104
-
105
-
Go to the [sample code repository](https://github.com/azure-samples/containerapps-albumapi-csharp) on GitHub to fork the repository. This article uses a C# code sample, but the programming language and environment doesn't matter for the reason of the tutorial.
106
-
107
-
Select the **Fork** button at the top of the album API repo to fork the repo to your account. This creates a repo with a name in the form of `https://github.com/<owner>/containerapps-albumapi-csharp`, where `<owner>` is your Github username. Save this repo name, as you'll use it in the next section.
108
-
109
103
## Create and deploy the container app
110
104
111
105
Create and deploy your container app with the `containerapp up` command. This command creates a:
@@ -118,8 +112,6 @@ If any of these resources already exist, the command uses the existing resources
118
112
119
113
Lastly, the command creates and deploys the container app using a public container image.
120
114
121
-
Replace the `<YOUR_GITHUB_REPOSITORY_NAME>` with your GitHub repository name from the [previous section](#prepare-the-github-repository).
By setting `--ingress` to `external`, you make the container app available to public requests.
159
149
160
-
The `up` command returns the fully qualified domain name (FQDN) for the container app. Copy this FQDN to a text file. You'll use it in the [Send requests](#send-requests) section. An example FQDN looks like the following:
150
+
The `up` command returns the fully qualified domain name (FQDN) for the container app. Copy this FQDN to a text file. You'll use it in the [Send requests](#send-requests) section. Your FQDN looks like the following example:
The `show` command returns entries from the system logs for your container app in real time. The following is an example of the type of response you can expect.
212
+
The `show` command returns entries from the system logs for your container app in real time. You can expect a response like the following example:
223
213
224
214
```json
225
215
{
@@ -275,19 +265,19 @@ For more information, see [az containerapp logs](/cli/azure/containerapp/logs).
275
265
Open a new bash shell. Run the following command, replacing `<YOUR_CONTAINER_APP_FQDN>` with the fully qualified domain name for your container app that you saved from the [Create and deploy the container app](#create-and-deploy-the-container-app) section.
These commands send 50 requests to your container app in asynchronous batches of five requests each.
303
+
These commands send 50 requests to your container app in asynchronous batches of 10 requests each.
314
304
315
305
| Command or argument | Description |
316
306
|---|---|
317
-
|`[runspacefactory]::CreateRunspacePool(1,5)`| Creates a `RunspacePool` that allows up to five runspaces to run concurrently. |
307
+
|`[runspacefactory]::CreateRunspacePool(1,10)`| Creates a `RunspacePool` that allows up to 10 runspaces to run concurrently. |
318
308
| `1..50 | % { }` | Runs the code enclosed in the curly braces 50 times. |
319
309
|`$ps = [powershell]::Create()`| Creates a new PowerShell instance. |
320
310
|`$ps.RunspacePool = $Runspace`| Tells the PowerShell instance to run in the `RunspacePool`. |
@@ -323,7 +313,7 @@ These commands send 50 requests to your container app in asynchronous batches of
323
313
|`.AddParameter("Uri", $url)`| Sends a request to your container app. |
324
314
|`[void]$ps.BeginInvoke()`| Tells the PowerShell instance to run asynchronously. |
325
315
326
-
For more information, refer to[Beginning Use of PowerShell Runspaces](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
316
+
For more information, see[Beginning Use of PowerShell Runspaces](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
327
317
328
318
---
329
319
@@ -363,16 +353,16 @@ You may need to select **Refresh** to see the new replicas.
363
353
1. Select the blue checkmark icon to finish editing the splitting.
364
354
1. The graph shows the requests received by your container app, split by replica.
1. By default, the graph scale is set to last 24 hours, with a time granularity of 15 minutes. Select the scale and change it to the last 30 minutes, with a time granularity of one minute. Select the **Apply** button.
369
359
1. Select on the graph and drag to highlight the recent increase in requests received by your container app.
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-2.png" alt-text="Container app metrics graph, showing requests split by replica, with a scale of 30 minutes and time granularity of one minute.":::
372
362
373
363
The following screenshot shows a zoomed view of how the requests received by your container app are divided among replicas.
0 commit comments