Skip to content

Commit 6d93f1c

Browse files
authored
Enhance README with Azure Functions optimization tips
Added recommendations for optimizing Azure Function App performance through environment variables.
1 parent 3c69610 commit 6d93f1c

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

scenario2-optimized/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Last updated: 2025-09-05
5555

5656
- **Deployment Method (Function App Environment Variables)**: ZipDeploy with mounted package
5757

58+
> This means your app is deployed as a mounted package (the .zip is mounted read-only, not extracted to disk). `Significantly reduces disk writes and temp file creation, as the app cannot write to its own content folder. This is the recommended deployment method for Azure Functions.`
59+
5860
```terraform
5961
# Use mounted package deployment for optimized disk usage
6062
"WEBSITE_RUN_FROM_PACKAGE" = "1"
@@ -64,6 +66,8 @@ Last updated: 2025-09-05
6466

6567
- **Diagnostics Settings (Function App Environment Variables)**: Minimal diagnostics enabled
6668

69+
> Disables detailed diagnostics. `Reduces logging overhead and disk write operations, improving performance.`
70+
6771
```terraform
6872
# Disable detailed diagnostics for better performance
6973
"WEBSITE_ENABLE_DETAILED_DIAGNOSTICS" = "false"
@@ -73,6 +77,8 @@ Last updated: 2025-09-05
7377

7478
- **Logging Configuration (Function App Environment Variables)**: Minimal logging enabled. Click here to understand more about [log levels types](https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2#configure-log-levels)
7579

80+
> Only warnings and errors are logged. `Minimizes disk usage from logs while still capturing important events.`
81+
7682
```terraform
7783
# Set minimal logging
7884
"AzureFunctionsJobHost__logging__LogLevel__Default" = "Warning"
@@ -82,6 +88,9 @@ Last updated: 2025-09-05
8288

8389
- **SCM Separation (Function App Environment Variables)**: Disabled for better performance
8490

91+
> SCM stands for Source Control Management (Kudu), used for advanced diagnostics and deployment.
92+
> Setting this to true means SCM (Kudu) and the main app run in the same process. `Increases performance and reduces resource consumption, but may reduce isolation between diagnostics and the main app`
93+
8594
```terraform
8695
# Disable SCM separation for better performance
8796
"WEBSITE_DISABLE_SCM_SEPARATION" = "true"
@@ -91,6 +100,8 @@ Last updated: 2025-09-05
91100

92101
- **Temp Access (Function App Environment Variables)**: Explicitly disabled for better performance
93102

103+
> Disables access to the temp directory for the Function App. Prevents the app from creating temp files, further reducing disk writes and risk of disk filling up.
104+
94105
```terraform
95106
# Disable temp file access for better performance
96107
"WEBSITE_ENABLE_TEMP_ACCESS" = "false"
@@ -104,6 +115,8 @@ Last updated: 2025-09-05
104115

105116
- **Application Insights**: Sampling enabled (5%). Click here to understand more about [Sampling overrides %](https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#sampling-overrides)
106117

118+
> Only 5% of telemetry data (logs, traces) is sent to Application Insights. `Greatly reduces disk and network usage, while still providing insight into application health.`
119+
107120
```terraform
108121
# Enable sampling - optimized for low disk usage
109122
sampling_percentage = 5
@@ -129,8 +142,6 @@ Last updated: 2025-09-05
129142
130143
- Azure Portal > Function App > Development Tools > Advanced tools ([Kudu](https://learn.microsoft.com/en-us/azure/app-service/resources-kudu))
131144

132-
133-
134145
- Application Insights
135146
- Azure Monitor metrics
136147

0 commit comments

Comments
 (0)