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
+30-24Lines changed: 30 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,19 +102,19 @@ az provider register --namespace Microsoft.OperationalInsights
102
102
103
103
## Prepare the GitHub repository
104
104
105
-
In a browser window, go to the GitHub repository and fork the repository. For this tutorial, we will simply use the C# repository, because the programming language does not matter to the tutorial.
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
106
107
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-csharp) to fork the repo to your account.
107
+
Select the **Fork** button at the top of the album API repo to fork the repo to your account.
108
108
109
109
## Create and deploy the container app
110
110
111
-
Create and deploy your container app with the `containerapp up` command. This command creates:
111
+
Create and deploy your container app with the `containerapp up` command. This command creates a:
112
112
113
-
-A resource group
114
-
-The Container Apps environment
115
-
-The Log Analytics workspace
113
+
-Resource group
114
+
- Container Apps environment
115
+
- Log Analytics workspace
116
116
117
-
If any of these resources already exist, the command uses them instead of creating new ones.
117
+
If any of these resources already exist, the command uses the existing resources rather than creating new ones.
118
118
119
119
Lastly, the command creates and deploys the container app using a public container image.
120
120
@@ -157,7 +157,7 @@ az containerapp up `
157
157
158
158
By setting `--ingress` to `external`, you make the container app available to public requests.
159
159
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. The FQDN looks like the following.
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:
These commands send 50 requests to your container app in concurrent batches of five requests each.
282
282
283
-
-`seq 1 50` generates a sequence from one to 50.
284
-
- The pipe operator `|` sends this sequence to the `xargs` command.
285
-
-`xargs` then runs `curl` with the specified URL.
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 `-P5` argument instructs `xargs` to run up to five processes at a time.
283
+
| Command or argument | Description |
284
+
|---|---|
285
+
|`seq 1 50`| Generates a sequence of numbers from 1 to 50. |
286
+
| `|` | The pipe operator sends the sequence to the `xargs` command. |
287
+
|`xargs`| Runs `curl` with the specified URL |
288
+
|`-Iname`| Acts as a placeholder for the output of `seq`. This prevents the return value from being sent to the `curl` command. |
289
+
|`curl`| Calls the given URL. |
290
+
|`-P5`| Instructs `xargs` to run up to five processes at a time. |
These commands send 50 requests to your container app in asynchronous batches of five requests each.
311
314
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
-
-`$ps = [powershell]::Create()` creates a new PowerShell instance.
315
-
-`$ps.RunspacePool = $Runspace` tells the PowerShell instance to run in the `RunspacePool`.
316
-
-`[void]$ps.AddCommand("Invoke-WebRequest").AddParameter("UseBasicParsing",$true).AddParameter("Uri",$url)` tells the PowerShell instance to send a request to your container app.
317
-
-`[void]$ps.BeginInvoke()` tells the PowerShell instance to run asynchronously.
315
+
| Command or argument | Description |
316
+
|---|---|
317
+
|`[runspacefactory]::CreateRunspacePool(1,5)`| Creates a `RunspacePool` that allows up to five runspaces to run concurrently. |
318
+
| `1..50 | % { }` | Runs the code enclosed in the curly braces 50 times. |
319
+
|`$ps = [powershell]::Create()`| Creates a new PowerShell instance. |
320
+
|`$ps.RunspacePool = $Runspace`| Tells the PowerShell instance to run in the `RunspacePool`. |
321
+
|`[void]$ps.AddCommand("Invoke-WebRequest")`| Sends a request to your container app. |
322
+
|`.AddParameter("UseBasicParsing", $true)`| Sends a request to your container app. |
323
+
|`.AddParameter("Uri", $url)`| Sends a request to your container app. |
324
+
|`[void]$ps.BeginInvoke()`| Tells the PowerShell instance to run asynchronously. |
318
325
319
-
For more information, see:
320
-
[Beginning Use of PowerShell Runspaces: Part 3](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
326
+
For more information, refer to [Beginning Use of PowerShell Runspaces](https://devblogs.microsoft.com/scripting/beginning-use-of-powershell-runspaces-part-3/)
321
327
322
328
---
323
329
@@ -337,7 +343,7 @@ In the first shell, where you ran the `az containerapp logs show` command, the o
337
343
}
338
344
```
339
345
340
-
## View scaling in Azure Portal (optional)
346
+
## View scaling in Azure portal (optional)
341
347
342
348
1. Sign in to the [Azure portal](https://portal.azure.com).
343
349
1. In the *Search* bar at the top, enter **my-container-app**.
@@ -348,7 +354,7 @@ In the first shell, where you ran the `az containerapp logs show` command, the o
0 commit comments