Azure App Service
Overview
An app service always runs in an App Service plan. In addition, Azure Functions also has the option of running in an App Service plan. An App Service plan defines a set of compute resources for a web app to run. These compute resources are analogous to the server farm in conventional web hosting. One or more apps can be configured to run on the same computing resources (or in the same App Service plan).
When you create an App Service plan in a certain region (for example, West Europe), a set of compute resources is created for that plan in that region. Whatever apps you put into this App Service plan run on these compute resources as defined by your App Service plan. Each App Service plan defines:
Operating System (Windows, Linux)
Region (West US, East US, etc.)
Number of VM instances
Size of VM instances (Small, Medium, Large)
Pricing tier (Free, Shared, Basic, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2)
Hosting Plans
The following is a summary of the benefits of the three main hosting plans for Functions:
Consumption plan
Scale automatically and only pay for compute resources when your functions are running.
On the Consumption plan, instances of the Functions host are dynamically added and removed based on the number of incoming events.
✔ Default hosting plan.
✔ Pay only when your functions are running.
✔ Scales automatically, even during periods of high load.
Premium plan
Automatically scales based on demand using pre-warmed workers, which run applications with no delay after being idle, runs on more powerful instances, and connects to virtual networks.
Consider the Azure Functions Premium plan in the following situations:
✔ Your function apps run continuously, or nearly continuously.
✔ You have a high number of small executions and a high execution bill, but low GB seconds in the
✔ You need more CPU or memory options than what is provided by the Consumption plan.
✔ Your code needs to run longer than the maximum execution time allowed on the Consumption plan.
✔ You require features that aren't available on the Consumption plan, such as virtual network connectivity.
✔ You want to provide a custom Linux image on which to run your functions.
Dedicated plan
Run your functions within an App Service plan at regular App Service plan rates.
Best for long-running scenarios where Durable Functions can't be used. Consider an App Service plan in the following situations:
✔ You have existing, underutilized VMs that are already running other App Service instances.
✔ Predictive scaling and costs are required.
ASE
App Service Environment (ASE) is an App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale.
ASEs are appropriate for application workloads that require:
✔ Very high scale.
✔ Full compute isolation and secure network access.
✔ High memory usage.
Kubernetes(Direct or Azure Arc)
Kubernetes provides a fully isolated and dedicated environment running on top of the Kubernetes platform.
Kubernetes is appropriate for application workloads that require:
✔ Custom hardware requirements.
✔ Isolation and secure network access.
✔ Ability to run in hybrid or multi-cloud environment.
✔ Run alongside existing Kubernetes applications and services.
Auto Scale
Will help when server cannot handle the number of requests but doesn't help with resource intensive tasks
Autoscale resource is a rule with the following condition
Scale based on metric
Scaling to specific instance count based on a schedule. E.g. Xmas time
Multiple conditions are treated as an OR not AND
Networking features
Inbound IP restrictions
✅Yes
✅Yes
✅Yes
✅Yes
Inbound Private Endpoints
❌No
✅Yes
✅Yes
✅Yes
Virtual network integration
❌No
✅Yes (Regional)
✅Yes (Regional and Gateway)
✅Yes
Virtual network triggers (non-HTTP)
❌No
✅Yes
✅Yes
✅Yes
Hybrid connections (Windows only)
❌No
✅Yes
✅Yes
✅Yes
Outbound IP restrictions
❌No
✅Yes
✅Yes
✅Yes
Deploy App
Deploy to a Staging Environment
https://docs.microsoft.com/en-us/azure/app-service/scripts/cli-deploy-staging-environment
Reference
https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans
Create an App Service app with deployment from GitHub using Azure CLI: https://learn.microsoft.com/en-us/azure/app-service/scripts/cli-deploy-github
Configure TLS mutual authentication for Azure App Service: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-configure-tls-mutual-auth
Map an existing custom DNS name to Azure App Service: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain
Migrate custom software to Azure App Service using a custom container: https://learn.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux&tabs=azure-cli
Last updated