Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage.
However, you can try the [Azure pricing calculator](https://azure.com/e/e3490de2372a4f9b909b0d032560e41b) for the resources below.

- Azure Container Apps: Default host for app deployment as of 10/28/2024. See more details in [the ACA deployment guide](docs/azure_container_apps.md). Consumption plan with 1 CPU core, 2.0 GB RAM. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
- Azure Container Apps: Default host for app deployment as of 10/28/2024. See more details in [the ACA deployment guide](docs/azure_container_apps.md). Consumption plan with 0.5 CPU core, 1.0 GB RAM, minimum of 0 replicas. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
- Azure Container Registry: Basic tier. [Pricing](https://azure.microsoft.com/pricing/details/container-registry/)
- Azure App Service: Only provisioned if you deploy to Azure App Service following [the App Service deployment guide](docs/azure_app_service.md). Basic Tier with 1 CPU core, 1.75 GB RAM. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/app-service/linux/)
- Azure OpenAI: Standard tier, GPT and Ada models. Pricing per 1K tokens used, and at least 1K tokens are used per question. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/)
Expand Down
9 changes: 9 additions & 0 deletions docs/productionizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ We recommend using a Premium level SKU, starting with 1 CPU core.
You can use auto-scaling rules or scheduled scaling rules,
and scale up the maximum/minimum based on load.

### Azure Container Apps

The default container app uses a "Consumption" workload profile with 0.5 CPU cores and 1.0 GB RAM,
and scaling rules that allow for scaling all the way down to 0 replicas when idle.
For production, consider either increasing the CPU cores and memory or
[switching to a "Dedicated" workload profile](azure_container_apps.md#customizing-workload-profile),
and configure the scaling rules to keep at least two replicas running at all times.
Learn more in the [Azure Container Apps documentation](https://learn.microsoft.com/azure/container-apps).

## Additional security measures

* **Authentication**: By default, the deployed app is publicly accessible.
Expand Down
3 changes: 1 addition & 2 deletions infra/core/host/container-app-upsert.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ param containerMaxReplicas int = 10
@description('The amount of memory allocated to a single container instance, e.g., 1Gi')
param containerMemory string = '1.0Gi'

@description('The minimum number of replicas to run. Must be at least 1.')
@minValue(1)
@description('The minimum number of replicas to run. Must be at least 1 for non-consumption workloads.')
param containerMinReplicas int = 1

@description('The name of the container')
Expand Down
5 changes: 3 additions & 2 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,9 @@ module acaBackend 'core/host/container-app-upsert.bicep' = if (deploymentTarget
identityType: 'UserAssigned'
tags: union(tags, { 'azd-service-name': 'backend' })
targetPort: 8000
containerCpuCoreCount: '1.0'
containerMemory: '2Gi'
containerCpuCoreCount: '0.5'
containerMemory: '1Gi'
containerMinReplicas: 0
allowedOrigins: allowedOrigins
env: union(appEnvVariables, {
// For using managed identity to access Azure resources. See https://github.com/microsoft/azure-container-apps/issues/442
Expand Down
Loading