Gap-4: Functions Operate (B → A) — Hosting plan guide + cold start playbook#1638
Gap-4: Functions Operate (B → A) — Hosting plan guide + cold start playbook#1638
Conversation
There was a problem hiding this comment.
Pull request overview
Adds reference documentation for Azure Functions hosting plan selection and cold-start mitigation, aimed at helping readers choose a plan and reduce latency.
Changes:
- Introduces a hosting plan comparison matrix, pricing notes, and decision flow.
- Adds cold start impact guidance and mitigation strategies (including CLI/Bicep examples).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| plugin/skills/azure-prepare/references/services/functions/hosting-plans.md | New hosting plan comparison, cost model summary, and decision criteria. |
| plugin/skills/azure-prepare/references/services/functions/cold-start.md | New cold start mitigation playbook with plan-by-plan strategies and infra examples. |
| | Feature | Consumption (Y1) | Flex Consumption (FC1) | Premium (EP1-EP3) | Dedicated (B1-P3v3) | Container Apps | | ||
| |---------|:-:|:-:|:-:|:-:|:-:| | ||
| | **Max scale (instances)** | 200 | 1000 | 100 | 10-30 | 300 | | ||
| | **Per-function scaling** | ❌ | ✅ | ❌ | ❌ | ❌ | | ||
| | **Always-ready instances** | ❌ | ✅ | ✅ | ✅ (always on) | ✅ (minReplicas) | | ||
| | **Scale to zero** | ✅ | ✅ | ❌ (≥1) | ❌ | ✅ | | ||
| | **VNet integration** | ❌ | ✅ | ✅ | ✅ (Standard+) | ✅ | | ||
| | **Private endpoints** | ❌ | ✅ | ✅ | ✅ (Standard+) | ✅ | | ||
| | **Deployment slots** | Win: 1 / Linux: ❌ | ❌ | ✅ 20 | ✅ 5-20 | Via revisions | | ||
| | **Max execution (min)** | 10 | 30 | Unlimited | Unlimited | Unlimited | | ||
| | **Min memory (GB)** | 1.5 | 2-4 | 3.5-14 | 1.75-14 | 0.5-4 | | ||
| | **OS support** | Windows + Linux | Linux only | Windows + Linux | Windows + Linux | Linux only | | ||
| | **Idle timeout** | 5 min | Configurable | None | None | Configurable | |
There was a problem hiding this comment.
All tables start with ||, which renders an extra empty first column in standard Markdown. Use a single leading | for header/separator/body rows so the tables render as intended.
| | Plan | Typical Cold Start | Can Eliminate? | | ||
| |------|-------------------|----------------| | ||
| | Consumption (Y1) | 2–10 s | ❌ No (timer workaround only) | | ||
| | Flex Consumption (FC1) | <1 s (with always-ready) | ✅ Yes | | ||
| | Premium (EP1–EP3) | <1 s (pre-warmed) | ✅ Yes | | ||
| | Dedicated | None (always on) | ✅ Always running | | ||
| | Container Apps | 1–5 s (with minReplicas: 0) | ✅ Yes (set minReplicas ≥ 1) | |
There was a problem hiding this comment.
Same Markdown issue here: the leading || creates an unintended blank column. Converting these tables to standard | ... | formatting will prevent rendering inconsistencies across Markdown viewers.
| Need VNet integration? | ||
| ├─ No → Consumption (lowest cost) | ||
| └─ Yes | ||
| Execution time > 10 min? |
There was a problem hiding this comment.
This decision tree conflicts with the matrix above where Flex Consumption has a 30-minute max execution. As written, workloads needing 11–30 minutes would be directed away from Flex. Update the branching to reflect Flex’s stated 30-minute limit (or adjust the matrix if the 30-minute value is not intended).
| Execution time > 10 min? | |
| Execution time > 30 min? |
| | Dedicated (B1) | Per-instance per-hour; always running | ~$55+/mo (1 instance) | | ||
| | Container Apps | Per-vCPU-s + per-GiB-s; scale-to-zero | $0 – varies | | ||
|
|
||
| > 💡 **Tip:** Consumption and Flex Consumption are the only plans that truly scale to zero and charge nothing at idle. |
There was a problem hiding this comment.
This tip is inconsistent with the matrix row that indicates Container Apps can scale to zero. If the intent is 'only Azure Functions hosting plans' (excluding Container Apps), clarify that explicitly; otherwise, adjust the tip to include Container Apps (and qualify any baseline/environment costs separately).
| > 💡 **Tip:** Consumption and Flex Consumption are the only plans that truly scale to zero and charge nothing at idle. | |
| > 💡 **Tip:** Among Azure Functions hosting plans, Consumption and Flex Consumption are the only options that truly scale your function instances to zero and charge nothing while idle. Azure Container Apps can also scale containers to zero, but you may still incur baseline environment costs. |
| | Use Windows over Linux | Windows Consumption generally has faster cold starts | Platform constraint | | ||
| | Optimize startup code | Lazy-load heavy modules; defer DB connections | Code changes required | | ||
|
|
||
| ```json |
There was a problem hiding this comment.
The fenced block is labeled json but includes a // comment, which is invalid JSON. Either remove the comment line or change the fence to jsonc (or plain text) to avoid encouraging copy/paste of invalid JSON.
| ```json | |
| ```jsonc |
| | .NET | Use ReadyToRun compilation; avoid heavy DI in startup | | ||
| | Node.js | Minimize `node_modules`; use ESM and tree-shaking | | ||
| | Python | Reduce package count; precompile `.pyc` files | | ||
| | Java | Use GraalVM native image or SnapStart (where supported) | |
There was a problem hiding this comment.
SnapStart is an AWS Lambda feature and is not applicable to Azure Functions. Replace this with Azure-relevant Java cold-start guidance (or remove the reference) to avoid misleading readers.
| | Java | Use GraalVM native image or SnapStart (where supported) | | |
| | Java | Prefer Java 17 on Functions v4; minimize static initialization and classpath size | |
Details# 🔍 Token Analysis Report
fatal: path 'plugin/skills/azure-prepare/references/services/functions/cold-start.md' exists on disk, but not in 'origin/main' 📊 Token Change ReportComparing Summary
Changed Files
📊 Token Limit Check ReportChecked: 526 files
|
| File | Tokens | Limit | Over By |
|---|---|---|---|
.github/skills/analyze-test-run/SKILL.md |
2471 | 500 | +1971 |
.github/skills/file-test-bug/SKILL.md |
628 | 500 | +128 |
.github/skills/sensei/README.md |
3531 | 2000 | +1531 |
.github/skills/sensei/SKILL.md |
2382 | 500 | +1882 |
.github/skills/sensei/references/EXAMPLES.md |
3707 | 2000 | +1707 |
.github/skills/sensei/references/LOOP.md |
4181 | 2000 | +2181 |
.github/skills/sensei/references/SCORING.md |
3927 | 2000 | +1927 |
.github/skills/skill-authoring/SKILL.md |
817 | 500 | +317 |
plugin/skills/appinsights-instrumentation/SKILL.md |
908 | 500 | +408 |
plugin/skills/azure-ai/SKILL.md |
817 | 500 | +317 |
plugin/skills/azure-aigateway/SKILL.md |
1258 | 500 | +758 |
plugin/skills/azure-aigateway/references/policies.md |
2342 | 2000 | +342 |
plugin/skills/azure-cloud-migrate/references/services/functions/lambda-to-functions.md |
2600 | 2000 | +600 |
plugin/skills/azure-cloud-migrate/references/services/functions/runtimes/javascript.md |
2181 | 2000 | +181 |
plugin/skills/azure-compliance/SKILL.md |
1185 | 500 | +685 |
plugin/skills/azure-compute/SKILL.md |
755 | 500 | +255 |
plugin/skills/azure-compute/workflows/vm-recommender/vm-recommender.md |
2393 | 2000 | +393 |
plugin/skills/azure-compute/workflows/vm-troubleshooter/references/cannot-connect-to-vm.md |
7308 | 2000 | +5308 |
plugin/skills/azure-cost-optimization/SKILL.md |
3900 | 500 | +3400 |
plugin/skills/azure-deploy/SKILL.md |
1562 | 500 | +1062 |
plugin/skills/azure-diagnostics/SKILL.md |
1132 | 500 | +632 |
plugin/skills/azure-diagnostics/aks-troubleshooting/networking.md |
2147 | 2000 | +147 |
plugin/skills/azure-diagnostics/aks-troubleshooting/node-issues.md |
2003 | 2000 | +3 |
plugin/skills/azure-enterprise-infra-planner/SKILL.md |
991 | 500 | +491 |
plugin/skills/azure-enterprise-infra-planner/references/constraints/compute-apps.md |
2022 | 2000 | +22 |
plugin/skills/azure-hosted-copilot-sdk/SKILL.md |
608 | 500 | +108 |
plugin/skills/azure-kubernetes/SKILL.md |
2266 | 500 | +1766 |
plugin/skills/azure-kusto/SKILL.md |
2149 | 500 | +1649 |
plugin/skills/azure-messaging/SKILL.md |
967 | 500 | +467 |
plugin/skills/azure-prepare/SKILL.md |
2607 | 500 | +2107 |
plugin/skills/azure-prepare/references/aspire.md |
2991 | 2000 | +991 |
plugin/skills/azure-prepare/references/plan-template.md |
2559 | 2000 | +559 |
plugin/skills/azure-prepare/references/recipes/azd/terraform.md |
3012 | 2000 | +1012 |
plugin/skills/azure-prepare/references/resources-limits-quotas.md |
3322 | 2000 | +1322 |
plugin/skills/azure-prepare/references/security.md |
2092 | 2000 | +92 |
plugin/skills/azure-prepare/references/services/functions/bicep.md |
3065 | 2000 | +1065 |
plugin/skills/azure-prepare/references/services/functions/templates/SPEC-composable-templates.md |
6187 | 2000 | +4187 |
plugin/skills/azure-prepare/references/services/functions/templates/recipes/composition.md |
4649 | 2000 | +2649 |
plugin/skills/azure-prepare/references/services/functions/terraform.md |
3358 | 2000 | +1358 |
plugin/skills/azure-quotas/SKILL.md |
3445 | 500 | +2945 |
plugin/skills/azure-quotas/references/commands.md |
2644 | 2000 | +644 |
plugin/skills/azure-resource-lookup/SKILL.md |
1279 | 500 | +779 |
plugin/skills/azure-resource-visualizer/SKILL.md |
2054 | 500 | +1554 |
plugin/skills/azure-storage/SKILL.md |
1180 | 500 | +680 |
plugin/skills/azure-upgrade/SKILL.md |
1001 | 500 | +501 |
plugin/skills/azure-upgrade/references/services/functions/automation.md |
3463 | 2000 | +1463 |
plugin/skills/azure-upgrade/references/services/functions/consumption-to-flex.md |
2773 | 2000 | +773 |
plugin/skills/azure-validate/SKILL.md |
906 | 500 | +406 |
plugin/skills/entra-app-registration/SKILL.md |
2068 | 500 | +1568 |
plugin/skills/entra-app-registration/references/api-permissions.md |
2545 | 2000 | +545 |
plugin/skills/entra-app-registration/references/cli-commands.md |
2211 | 2000 | +211 |
plugin/skills/entra-app-registration/references/console-app-example.md |
2752 | 2000 | +752 |
plugin/skills/entra-app-registration/references/oauth-flows.md |
2375 | 2000 | +375 |
plugin/skills/microsoft-foundry/SKILL.md |
2870 | 500 | +2370 |
plugin/skills/microsoft-foundry/foundry-agent/create/create.md |
3016 | 2000 | +1016 |
plugin/skills/microsoft-foundry/foundry-agent/deploy/deploy.md |
5511 | 2000 | +3511 |
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/eval-datasets.md |
2342 | 2000 | +342 |
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/references/trace-to-dataset.md |
4268 | 2000 | +2268 |
plugin/skills/microsoft-foundry/foundry-agent/observe/observe.md |
2547 | 2000 | +547 |
plugin/skills/microsoft-foundry/foundry-agent/trace/references/kql-templates.md |
2701 | 2000 | +701 |
plugin/skills/microsoft-foundry/models/deploy-model/SKILL.md |
1640 | 500 | +1140 |
plugin/skills/microsoft-foundry/models/deploy-model/capacity/SKILL.md |
1739 | 500 | +1239 |
plugin/skills/microsoft-foundry/models/deploy-model/customize/SKILL.md |
2235 | 500 | +1735 |
plugin/skills/microsoft-foundry/models/deploy-model/customize/references/customize-workflow.md |
3335 | 2000 | +1335 |
plugin/skills/microsoft-foundry/models/deploy-model/preset/SKILL.md |
1226 | 500 | +726 |
plugin/skills/microsoft-foundry/models/deploy-model/preset/references/preset-workflow.md |
5534 | 2000 | +3534 |
plugin/skills/microsoft-foundry/quota/quota.md |
2129 | 2000 | +129 |
plugin/skills/microsoft-foundry/quota/references/capacity-planning.md |
2029 | 2000 | +29 |
plugin/skills/microsoft-foundry/references/sdk/foundry-sdk-py.md |
2162 | 2000 | +162 |
Consider moving content to
references/subdirectories.
Automated token analysis. See skill authoring guidelines for best practices.
Closes #1612 | Parent: #1608
2 files: hosting-plans.md (Consumption vs Flex vs Premium vs Dedicated comparison matrix), cold-start.md (mitigation strategies per plan).