Skip to content

Commit 0c1bdd5

Browse files
committed
Improve portal section.
1 parent 02831cd commit 0c1bdd5

6 files changed

+26
-14
lines changed

articles/container-apps/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
- name: Create and deploy a container app using the CLI
196196
href: tutorial-deploy-first-app-cli.md
197197
- name: Scale a container app
198-
href: quickstart-scaling.md
198+
href: tutorial-scaling.md
199199
- name: Build a multiple app scenario
200200
expanded: true
201201
items:
39.2 KB
Loading
48.1 KB
Loading
64.8 KB
Loading

articles/container-apps/quickstart-scaling.md renamed to articles/container-apps/tutorial-scaling.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In this tutorial, you add an HTTP scale rule to your container app and observe h
2121

2222
| Requirement | Instructions |
2323
|--|--|
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. |
2525
| GitHub Account | Get one for [free](https://github.com/join). |
2626
| Azure CLI | Install the [Azure CLI](/cli/azure/install-azure-cli). |
2727

@@ -275,16 +275,16 @@ For more information, see [az containerapp logs](/cli/azure/containerapp/logs).
275275
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.
276276

277277
```bash
278-
seq 1 20 | xargs -Iname -P20 curl "<YOUR_CONTAINER_APP_FQDN>"
278+
seq 1 50 | xargs -Iname -P5 curl "<YOUR_CONTAINER_APP_FQDN>"
279279
```
280280

281-
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.
282282

283-
- `seq 1 20` generates a sequence from one to 20.
283+
- `seq 1 50` generates a sequence from one to 50.
284284
- The pipe operator `|` sends this sequence to the `xargs` command.
285285
- `xargs` then runs `curl` with the specified URL.
286286
- 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.
288288

289289
For more information, see the documentation for:
290290
- [seq](https://www.man7.org/linux/man-pages/man1/seq.1.html)
@@ -297,20 +297,20 @@ Open a new command prompt and enter PowerShell. Run the following commands, repl
297297

298298
```powershell
299299
$url="<YOUR_CONTAINER_APP_FQDN>"
300-
$Runspace = [runspacefactory]::CreateRunspacePool(1,20)
300+
$Runspace = [runspacefactory]::CreateRunspacePool(1,5)
301301
$Runspace.Open()
302-
1..20 | % {
302+
1..50 | % {
303303
$ps = [powershell]::Create()
304304
$ps.RunspacePool = $Runspace
305305
[void]$ps.AddCommand("Invoke-WebRequest").AddParameter("UseBasicParsing",$true).AddParameter("Uri",$url)
306306
[void]$ps.BeginInvoke()
307307
}
308308
```
309309

310-
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.
311311

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.
314314
- `$ps = [powershell]::Create()` creates a new PowerShell instance.
315315
- `$ps.RunspacePool = $Runspace` tells the PowerShell instance to run in the `RunspacePool`.
316316
- `[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
351351
Note you might need to click *Refresh* to see the new replicas.
352352

353353
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.
356359

357-
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics.png" alt-text="Container app replica count.":::
360+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-1.png" alt-text="Container app metrics graph.":::
361+
362+
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.
364+
365+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-2.png" alt-text="Container app metrics graph.":::
366+
367+
The resulting zoomed view shows how the requests received by your container app are divided among the replicas.
368+
369+
:::image type="content" source="media/scale-app/azure-container-apps-scale-replicas-metrics-3.png" alt-text="Container app metrics graph.":::
358370

359371
## Clean up resources
360372

0 commit comments

Comments
 (0)