Azure App Service is the best choice for most web apps. Deployment and management are integrated into the platform, sites can scale quickly to handle high traffic loads, and the built-in load balancing and traffic manager provide high availability. You can move existing sites to Azure App Service easily with an online migration tool, use an open-source app from the Web Application Gallery, or create a new site using the framework and tools of your choice. The WebJobs feature makes it easy to add background job processing to your App Service web app.
If you need more control over the web server environment, such as the ability to remote into your server or configure server startup tasks, Azure Cloud Services is typically the best option.
If you have an existing application that would require substantial modifications to run in Azure App Service or Azure Cloud Services, you could choose Azure Virtual Machines in order to simplify migrating to the cloud. However, correctly configuring, securing, and maintaining VMs requires much more time and IT expertise compared to Azure App Service and Cloud Services. If you are considering Azure Virtual Machines, make sure you take into account the ongoing maintenance effort required to patch, update, and manage your VM environment.
The following diagram illustrates the relative degree of control versus ease of use for each of these web hosting options on Azure.
Here are some common application scenarios with recommendations as to which Azure web hosting option might be most appropriate for each.
Azure App Service is a great solution for complex business applications. It lets you develop apps that scale automatically on a load balanced platform, are secured with Active Directory, and connect to your on-premises resources. It makes managing those apps easy through a world-class management portal and APIs, and allows you to gain insight into how customers are using them with app insight tools. The Webjobs feature lets you run background processes and tasks as part of your web tier, while hybrid connectivity and VNET features make it easy to connect back to on-premises resources. Azure App Service provides three 9's SLA for web apps and enables you to:
Azure App Service is a great solution for hosting corporate websites. It enables web apps to scale quickly and easily to meet demand across a global network of datacenters. It offers local reach, fault tolerance, and intelligent traffic management. All on a platform that provides world-class management tools, allowing you to gain insight into site health and site traffic quickly and easily. Azure App Service provides three 9's SLA for web apps and enables you to:
Azure App Service makes it easy to avoid the infrastructure costs associated with migrating older IIS6 applications. Microsoft has created easy to use migration tools and detailed migration guidance that enable you to check compatibility and identify any changes that need to be made. Integration with Visual Studio, TFS, and common CMS tools makes it easy to deploy IIS6 applications directly to the cloud. Once deployed, the Azure management portal provides robust management tools that enable you to scale down to manage costs and up to meet demand as necessary. With the migration tool you can:
Azure App Service is a great solution for this scenario, because you can start using it for free and then add more capabilities when you need them. Each free web app comes with a domain provided by Azure (your_company.azurewebsites.net), and the platform includes integrated deployment and management tools as well as an application gallery that make it easy to get started. There are many other services and scaling options that allow the site to evolve with increased user demand. With Azure App Service, you can:
For web developers and designers, Azure App Service integrates easily with a variety of frameworks and tools, includes deployment support for Git and FTP, and offers tight integration with tools and services such as Visual Studio and SQL Database. With App Service, you can:
If you’re running a multi-tier application, such as a web server that connects to a database, Azure App Service is a good option that offers tight integration with Azure SQL Database. And you can use the WebJobs feature for running backend processes.
Choose Cloud Service for one or more of your tiers if you need more control over the server environment, such as the ability to remote into your server or configure server startup tasks.
Choose Virtual Machines for one or more of your tiers if you want to use your own machine image or run server software or services that you can't configure on Cloud Services.
If your application requires complex installation or configuration of software and the operating system, Virtual Machines is probably the best solution. With Virtual Machines, you can:
If your open source framework is supported on App Service, the languages and frameworks needed by your application are configured for you automatically. App Service enables you to:
If your open source framework is not supported on App Service, you can run it on either of the other two Azure web hosting options. With Cloud Services, you use startup tasks to install and configure any required open source software that runs on Windows. With Virtual Machines, you install and configure the software on the machine image, which can be Windows or Linux-based.
If you want to create a line-of-business application, your website might require direct access to services or data on the corporate network. This is possible on App Service, Cloud Services, and Virtual Machines using the Azure Virtual Network service. On App Service you can use the VNET integration feature, which allows your Azure applications to run as if they were on your corporate network.
HTTP-based web services enable you to support a wide variety of clients, including mobile clients. Frameworks like ASP.NET Web API integrate with Visual Studio to make it easier to create and consume REST services. These services are exposed from a web endpoint, so it is possible to use any web hosting technique on Azure to support this scenario. However, App Service is a great choice for hosting REST APIs. With App Service, you can:
In addition, Azure App Service has a new preview feature for REST APIs: API apps. For more information about API apps, see What are API apps.
The following table compares the capabilities of App Service, Cloud Services, and Virtual Machines to help you make the best choice. For current information about the SLA for each option, see Azure Service Level Agreements.
|Feature||App Service (web apps)||Cloud Services (web roles)||Virtual Machines||Notes|
|Near-instant deployment||X||Deploying an application or an application update to a Cloud Service, or creating a VM, takes several minutes at least; deploying an application to a web app takes seconds.|
|Scale up to larger machines without redeploy||X|
|Web server instances share content and configuration, which means you don't have to redeploy or reconfigure as you scale.||X|
|Multiple deployment environments (production and staging)||X||X|
|Automatic OS update management||X||X|
|Seamless platform switching (easily move between 32 bit and 64 bit)||X||X|
|Deploy code with GIT, FTP||X||X|
|Deploy code with Web Deploy||X||X||Cloud Services supports the use of Web Deploy to deploy updates to individual role instances. However, you can't use it for initial deployment of a role, and if you use Web Deploy for an update you have to deploy separately to each instance of a role. Multiple instances are required in order to qualify for the Cloud Service SLA for production environments.|
|Access to services like Service Bus, Storage, SQL Database||X||X||X|
|Host web or web services tier of a multi-tier architecture||X||X||X|
|Host middle tier of a multi-tier architecture||X||X||X||App Service web apps can easily host a REST API middle tier, and the WebJobs feature can host background processing jobs. You can run WebJobs in a dedicated website to achieve independent scalability for the tier. The preview API apps feature provides even more features for hosting REST services.|
|Integrated MySQL-as-a-service support||X||X||X||Cloud Services can integrate MySQL-as-a-service through ClearDB's offerings, but not as part of the Management Portal workflow.|
|Support for ASP.NET, classic ASP, Node.js, PHP, Python||X||X||X|
|Scale out to multiple instances without redeploy||X||X||X||Virtual Machines can scale out to multiple instances, but the services running on them must be written to handle this scale-out. You have to configure a load balancer to route requests across the machines, and create an Affinity Group to prevent simultaneous restarts of all instances due to maintenance or hardware failures.|
|Support for SSL||X||X||X||For App Service web apps, SSL for custom domain names is only supported for Basic and Standard mode. For information about using SSL with web apps, see Configuring an SSL certificate for an Azure Website.|
|Visual Studio integration||X||X||X|
|Deploy code with TFS||X||X||X|
|Network isolation with Azure Virtual Network||X||X||X||See also Azure Websites Virtual Network Integration|
|Support for Azure Traffic Manager||X||X||X|
|Integrated Endpoint Monitoring||X||X||X|
|Remote desktop access to servers||X||X|
|Install any custom MSI||X||X|
|Ability to define/execute start-up tasks||X||X|
|Can listen to ETW events||X||X|
If you want to get started with Azure App Service before signing up for an account, go to https://trywebsites.azurewebsites.net, where you can immediately create a short-lived starter app in Azure App Service for free. No credit card required, no commitments.
For more information about the three web hosting options, see the following resources:
To get started with the option(s) you choose for your application, see the following resources: