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: articles/container-apps/tutorial-scaling.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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 *Contributor* 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 *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. |
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
@@ -275,16 +275,16 @@ For more information, see [az containerapp logs](/cli/azure/containerapp/logs).
275
275
Open a new bash shell using Windows Subsystem for Linux or a Linux virtual machine. 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 20 concurrent requests to your container app.
281
+
These commands send 50 requests to your container app in concurrent batches of five requests each.
282
282
283
-
-`seq 1 20` generates a sequence from one to 20.
283
+
-`seq 1 50` generates a sequence from one to 50.
284
284
- The pipe operator `|` sends this sequence to the `xargs` command.
285
285
-`xargs` then runs `curl` with the specified URL.
286
286
- The `-Iname` argument to `xargs` acts as a placeholder for the output of `seq`. This prevents the return value from being sent to the `curl` command.
287
-
- The `-P20` argument instructs `xargs` to run up to 20 processes at a time.
287
+
- The `-P5` argument instructs `xargs` to run up to five processes at a time.
These commands send 20 asynchronous requests to your container app.
310
+
These commands send 50 requests to your container app in asynchronous batches of five requests each.
311
311
312
-
-`[runspacefactory]::CreateRunspacePool(1,20)` creates a `RunspacePool` that allows up to 20 runspaces to run concurrently.
313
-
-`1..20 | % { }` runs the code enclosed in the curly braces 20 times.
312
+
-`[runspacefactory]::CreateRunspacePool(1,5)` creates a `RunspacePool` that allows up to five runspaces to run concurrently.
313
+
-`1..50 | % { }` runs the code enclosed in the curly braces 50 times.
314
314
-`$ps = [powershell]::Create()` creates a new PowerShell instance.
315
315
-`$ps.RunspacePool = $Runspace` tells the PowerShell instance to run in the `RunspacePool`.
316
316
-`[void]$ps.AddCommand("Invoke-WebRequest").AddParameter("UseBasicParsing",$true).AddParameter("Uri",$url)` tells the PowerShell instance to send a request to your container app.
@@ -351,10 +351,22 @@ In the first shell, where you ran the `az containerapp logs show` command, the o
351
351
Note you might need to click *Refresh* to see the new replicas.
352
352
353
353
1. In the navigation bar at the left, expand *Monitoring* and select *Metrics*.
354
-
1. In the *Metrics* page, set *Metric* to *Replica Count*.
355
-
1. The graph shows your container app's replica count has increased recently.
354
+
1. In the *Metrics* page, set *Metric* to *Requests*.
355
+
1. Click *Apply splitting*.
356
+
1. In the *Values* drop-down, check *Replica*.
357
+
1. Click the blue checkmark icon to finish editing the splitting.
358
+
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. Click the scale and change it to the last 30 minutes, with a time granularity of one minute. Click the *Apply* button.
363
+
1. Left-click on the graph and drag to highlight the recent increase in requests received by your container app.
0 commit comments