03 - Configuration (Dedicated)¶
Manage environment settings, runtime options, and host behavior per environment.
Prerequisites¶
- You completed 02 - First Deploy.
- Your function app
$APP_NAMEis deployed and running on the Dedicated plan.
What You'll Build¶
- Apply required app settings for the Node.js worker and runtime extension.
- Tune host-level timeout behavior appropriate for Dedicated plan characteristics.
- Validate effective settings in Azure.
Infrastructure Context
Plan: Dedicated (B1) | Timeout: Unlimited (-1) | Always On: ✅
Dedicated plans support unlimited function timeout (functionTimeout: -1), unlike Consumption (5/10 min) and Premium (30/60 min defaults). This makes Dedicated ideal for long-running workloads.
flowchart LR
CLI[Azure CLI] -->|appsettings set| FA[Function App\nDedicated B1]
subgraph CONFIG["App Settings"]
RT["FUNCTIONS_WORKER_RUNTIME=node"]
EXT["FUNCTIONS_EXTENSION_VERSION=~4"]
MEM["node --max-old-space-size=4096"]
TIMEOUT["functionTimeout: -1\n(unlimited)"]
end
FA --> CONFIG
style FA fill:#ff8c00,color:#fff
style CONFIG fill:#E3F2FD,stroke:#1976D2 Steps¶
-
Configure app settings.
az functionapp config appsettings set \ --name "$APP_NAME" \ --resource-group "$RG" \ --settings \ "FUNCTIONS_WORKER_RUNTIME=node" \ "FUNCTIONS_EXTENSION_VERSION=~4" \ "languageWorkers__node__arguments=--max-old-space-size=4096"Expected output (abridged):
Name SlotSetting Value -------------------------------------- ------------- ------------------------- FUNCTIONS_WORKER_RUNTIME False node FUNCTIONS_EXTENSION_VERSION False ~4 languageWorkers__node__arguments False --max-old-space-size=4096FUNCTIONS_WORKER_RUNTIME on Dedicated
On Dedicated plans,
FUNCTIONS_WORKER_RUNTIMEcan be set viaaz functionapp config appsettings setwithout issues. On Flex Consumption, this setting is platform-managed and cannot be changed via CLI. -
Configure host timeout.
The
host.jsonfile in your project root controls timeout behavior. For Dedicated plans, setfunctionTimeoutto-1for unlimited execution:Timeout values by plan
Plan Default Timeout Maximum Consumption 5 min 10 min Premium 30 min 60 min (unlimited with host.json)Dedicated 30 min Unlimited ( -1) -
Validate effective config.
az functionapp config appsettings list \ --name "$APP_NAME" \ --resource-group "$RG" \ --output tableExpected output (abridged):
Name Value ------------------------------------------- ----------------------------------- FUNCTIONS_WORKER_RUNTIME node FUNCTIONS_EXTENSION_VERSION ~4 AzureWebJobsStorage DefaultEndpointsProtocol=https;... APPLICATIONINSIGHTS_CONNECTION_STRING InstrumentationKey=... EventHubConnection__fullyQualifiedNamespace placeholder.servicebus.windows.net QueueStorage DefaultEndpointsProtocol=https;... WEBSITE_RUN_FROM_PACKAGE 1 languageWorkers__node__arguments --max-old-space-size=4096WEBSITE_RUN_FROM_PACKAGE
Dedicated plans automatically set
WEBSITE_RUN_FROM_PACKAGE=1for zip-based deployments. This setting is not required on Consumption or Flex Consumption. -
Review Dedicated-specific configuration notes.
- Always On: Enable via portal or Bicep (
alwaysOn: true) for non-HTTP triggers (timer, queue, blob). Without Always On, the app may idle and miss timer/queue events. - No content share: Unlike Premium and Consumption, Dedicated does not use
WEBSITE_CONTENTAZUREFILECONNECTIONSTRINGorWEBSITE_CONTENTSHARE. - Memory tuning:
--max-old-space-size=4096sets Node.js heap to 4 GB. Adjust based on your B1 (1.75 GB RAM) or S1/P1v3 tier.
- Always On: Enable via portal or Bicep (
Verification¶
The table confirms required Node.js worker settings are applied to the deployed app. Verify:
FUNCTIONS_WORKER_RUNTIMEisnodeFUNCTIONS_EXTENSION_VERSIONis~4languageWorkers__node__argumentsincludes--max-old-space-sizeWEBSITE_RUN_FROM_PACKAGEis1
See Also¶
- Tutorial Overview & Plan Chooser
- Node.js Language Guide
- Platform: Hosting Plans
- Operations: Deployment
- Recipes Index