Skip to content

Instantly share code, notes, and snippets.

@paulyuk
Last active June 25, 2024 19:27
Show Gist options
  • Save paulyuk/7609612ad5330e4e3aaf66b844b93075 to your computer and use it in GitHub Desktop.
Save paulyuk/7609612ad5330e4e3aaf66b844b93075 to your computer and use it in GitHub Desktop.
NDC Oslo 2024 Snippets

NDC Oslo 2024 Snippets for Functions Under the Hood at Scale

Configuring scale

General command to set

az functionapp scale config set --resource-group <RESOURCE_GROUP> --name <APP_NAME> --trigger-type http --trigger-settings perInstanceConcurrency=10

e.g. set to 2 events per instance

export RESOURCE_GROUP="rg-flex-ai-oslo"
export SERVICE_API_NAME="func-b2q2fard2jmqw-functions"
export CONCURRENCY=1
az functionapp scale config set --resource-group $RESOURCE_GROUP --name $SERVICE_API_NAME --trigger-type http --trigger-settings perInstanceConcurrency=$CONCURRENCY

View config

az functionapp scale config show --resource-group RESOURCE_GROUP --name SERVICE_API_NAME

Deploy a flex consumption app

export AZURE_FUNCTION_NAME="func-api-ptzeofks65jis-functions"
func azure functionapp publish $AZURE_FUNCTION_NAME --dotnet-isolated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment