Azure App Service enables quick building, deployment and scaling of Web apps and APIs on the users’ own terms. Users can work with .NET, .NET Core, Node.js, Java, Python or PHP, in containers or on Windows or Linux. It offers rigorous, enterprise-grade performance using a trusted, fully managed platform.
Platform as a Service (PaaS) is a cloud service model that provides different runtime environments in which a user can directly deploy applications. PaaS has a pay-as-you-go pricing model, features no upfront investment/capital expenditure, and has scalability and high availability. UI and CLI are available for managing PaaS and enabling a faster time to market, so that teams can focus on the core task of development.
Azure App Service is a popular PaaS solution offered by Microsoft Azure. It is easy to configure, and all the configurations are available in the portal. Portal settings and UI change and improve constantly. A runtime stack is available with specific versions for Java, Python, .NET, and so on. Azure App Service can easily be configured with Azure Active Directory. It comes with multiple pricing models and some of the best features such as deployment slots or troubleshooting, notifications, scaling configurations, and so on. Azure App Service Environment is a premium service available that allows you to host Azure App Service in a virtual network; hence, you can configure firewall rules and make it more secure. Azure App Service supports applications written in .NET, Node.js, PHP, Java, Python (on Linux), and HTML. It helps to host Web applications, mobile middleware or restful APIs.
|Azure portal||The Microsoft Azure portal allows end users to create and manage cloud resources using a Web portal. This portal has been continuously improving for the past few years. End users can manage the dashboard as per their own wishes by pinning specific resources according to priorities.|
|Azure regions, geographies, availability zones||Microsoft Azure is available in more than 130 countries/regions. It helps to manage security, governance and compliance requirements. Each geography contains two or more regions. Each region has availability zones. Each availability zone has one or more data centres. Services or products are available based on regions; to verify this you can go to https://azure.microsoft.com/en-in/global-infrastructure/services/|
|Resource groups||Resource groups are logical containers in the Microsoft Azure portal. You can create a resource group that contains all the resources for a Web application, for a business unit or for a specific project that contains multiple modules. You can assign role based access to the entire resource group. By deleting a resource group, all the resources or Azure services in the group will be deleted.|
|Role based access control — RBAC||Role based access control (RBAC) provides access management of Azure resources or resource groups. In a project or a business unit, if you want to provide access based on designation or a team’s work profile then RBAC is very important.|
|Table 1: Azure terminology|
The Azure App Service Overview section provides quick monitoring. Here you can get information related to the number of requests and average response time, data in, data out and HTTP 5xx errors. This helps to detect issues related to unavailability of service due to a high number of requests or those related to slow response time.
Azure App Service comes with a production slot. What if you want to isolate environments for different releases for different environments, such as dev or test or stage? The deployment slot feature helps you to create slots for different environments. A deployment slot has its own host name and configurations.
With each deployment slot you get the following:
- Unique host name
- App content
The Standard, Premium, or Isolated tier in Azure App Service supports multiple deployment slots. Go to App Services and select your app. Click on Deployment slots -> Add Slot. Provide the slot a name, and select whether to clone an app configuration (connection strings, language framework details, Web sockets, HTTP version, app settings, and so on) from another deployment slot or not. Click on Add -> Verify new slot in the Deployment slots section. Click on the new deployment slot to open that slot’s page in the Azure portal. The deployment slot has its own host name, and is also a live app isolated from the production slot.
Deployment slots provide a feature that helps to swap slots in Azure App Service. This includes the production slot as well. You can validate changes in the slots before you swap slots with the production slot, or deploy to production slot.
All instances available in the slot are warmed up and hence swapping them with the production slot will make them available in a ready-to-serve stage. This enables easy rollback as well. If you swap a slot with a production slot, but find some issues, then you can re-swap the slot. There is no extra charge for the feature.
The deployment centre in Azure App Service allows continuous deployment from such repositories as Azure Repos, GitHub and BitBucket. It provides a centralised overview and control on the deployments supported using Kudu or Azure pipelines.
In Azure App Service, app settings are used as environment variables. The connection strings section contains database connection strings, and these are available as environment variables. Connection strings are prefixed based on the type and database (Table 2).
|Database||Connection string environment variable|
|Table 2: Connection strings|
The general settings section allows configuration of the runtime stack, architecture, platform settings, and so on.
|Languages supported||Java supported versions (all running JRE 8)|
|Table 3: The languages supported by Azure App Service|
The pricing tiers and how resources are utilised or allocated for Azure App Service are as follows.
- Free and shared tiers: Worker processes on shared virtual machines
- Standard and premium tiers: Dedicated virtual machines
Pricing is integrated with the App Service Plan. The cost is estimated or calculated based on this plan.
|Scale up / Vertical scaling||Scale out / Horizontal scaling|
|More CPU, memory, disk space||Increase the number of virtual machine instances that run your app|
|Dedicated virtual machines (VMs), custom domains and certificates||Up to 30 instances based on the pricing tier|
|Deployment slots and auto scaling||Premium services – App Service Environment can scale up to 100 instances|
|Table 4: Vertical and horizontal scaling|
App Service Plan
An App Service Plan is a home where App Service is running. It contains a set of compute resources. One App Service Plan can have more than one App Service. One App Service can’t run on multiple App Service Plans. The App Service Plan is created in a specific region, and hence the App Service is hosted in the region where the plan is hosted.
|Criteria||Virtual machines||App service||Azure functions||Azure Kubernetes service||Container instances|
|Application composition||Agnostic||Applications, containers||Functions||Containers||Containers|
|Density||Agnostic||Multiple apps per instance via app service plans||Serverless||Multiple containers per node||No dedicated instances|
|Minimum number of nodes||1||1||Serverless||3||No dedicated nodes|
|State management||Stateless or Stateful||Stateless||Stateless||Stateless or Stateful||Stateless|
|Web hosting||Agnostic||Built-in||Not applicable||Agnostic||Agnostic|
|Deployment to dedicated VNet||Supported||Supported||Supported||Supported||Supported|
|Hybrid connectivity||Supported||Supported||Supported||Supported||Not supported|
|Local debugging||Agnostic||IIS Express, others||Visual Studio or Azure Functions CLI||Minikube, others||Local container runtime|
|Programming model||Agnostic||Web and API applications, WebJobs for background tasks||Functions with triggers||Agnostic||Agnostic|
|Application update||No built-in support||Deployment slots||Deployment slots||Rolling update||Not applicable|
|Auto scaling||Virtual machine scale sets||Built-in service||Built-in service||Pod auto-scaling, cluster auto-scaling||Not supported|
|Load balancer||Azure Load Balancer||Integrated||Integrated||Azure Load Balancer or Application Gateway||No built-in support|
|Scale limit||Platform image: 1000 nodes per scale set, Custom image: 600 nodes per scale set||20 instances, 100 with App Service Environment||200 instances per Function app||100 nodes per cluster (default limit)||20 container groups per subscription (default limit)|
|Multi-region failover||Traffic manager||Traffic manager||Azure Front Door||Traffic manager||Not supported|
|SSL||Configured in VM||Supported||Supported||Ingress controller||Uses sidecar container|
|Table 5: A comparison of the different services provided by Microsoft Azure (Reference: https://docs.microsoft.com/en-us/azure/architecture/ guide/technology-choices/compute-decision-tree)|
Free, Shared, Basic, Standard, Premium, PremiumV2 and Isolated pricing plans are available in App Service Plans.
For specific features, you need specific pricing plans. The Standard, Premium and Isolated tiers in Azure App Service support multiple deployment slots.
An App Service Plan consists of a region such as West US or East US, number of virtual machine instances, size of virtual machine instances such as small or medium; and the pricing tier such as Free, Shared, Basic, Standard, Premium, PremiumV2, and Isolated. The App in an App Service runs on an App Service Plan. All deployment slots run on the same App Service Plan.
Azure App Service supports scale up/vertical scaling and scale out/horizontal scaling.
For scale up, go to the Azure portal and click on App Service app page. Select Scale Up (App Service plan), choose your tier, and click Apply.
For scale out, again go to the Azure portal, and click on the App Service app page. Select Scale Up (App Service plan). Configure the manual scale where instance count can be modified manually as per need or configure custom auto-scale based on any metrics.