Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between an Azure Web Site and an Azure Web Role

What are the material differences between the new Azure Web Sites and the traditional Azure Web Roles for an ASP.NET MVC application? What reason would I choose a "web site" over a "web role" or vice versa?

Let's assume that I would need equal capacity in either case (e.g. 2 small instances). The prices seem comparable other than the fact that there is a 33% temporary discount for web sites while they are in their preview period.

Are there things that I can do with a "web site" that are difficulty or impossible with a web role? For example, does it become easy to put multiple web sites in a single set of VMs using "web sites"? Do I lose anything with a "web site" vs a "web role"? Ability to fine tune IIS? Ability to use the Cache service locally?

like image 450
Erv Walter Avatar asked Jun 08 '12 00:06

Erv Walter


People also ask

What is Azure web role?

Web Role is a Cloud Service role in Azure that is configured and customized to run web applications developed on programming languages/technologies that are supported by Internet Information Services (IIS), such as ASP.NET, PHP, Windows Communication Foundation and Fast CGI.

What are the two kinds of Azure web service roles?

There are two types of Azure Cloud Services roles. The only difference between the two is how your role is hosted on the VMs: Web role: Automatically deploys and hosts your app through IIS. Worker role: Does not use IIS, and runs your app standalone.

What are web roles?

A web role is a Microsoft server VM running Internet Information Services (IIS). A worker role is a Microsoft server VM not running IIS.

What is the difference between Azure Web App and Azure App Service?

There is no difference. To quote the documentation: The only difference between the three app types (API, web, mobile) is the name and icon used for them in the Azure portal. Behind the scene it is already using app service all the time.


2 Answers

Web Roles give you several features beyond Web Apps (formerly Web Sites):

  • Ability to run elevated startup scripts to install apps, modify registry settings, install performance counters, fine-tune IIS, etc.
  • Ability to split an app up into tiers (maybe Web Role for front end, Worker Role for backend processing) and scale independently
  • Ability to RDP into your VM for debugging purposes
  • Network isolation
  • Dedicated virtual IP address, which allows web role instances in a cloud service to access IP-restricted Virtual Machines
  • ACL-restricted endpoints (added in Azure SDK 2.3, April 2014)
  • Support for any TCP/UDP ports (Web Sites are restricted to TCP 80/443)

Web Apps have advantages over Web Roles though:

  • Near-instant deployment with deployment history / rollbacks
  • Visual Studio Online, github, local git, ftp, CodePlex, DropBox, BitBucket deployment support
  • Ability to roll out one of numerous CMS's and frameworks, (like WordPress, Joomla, Django, MediaWiki, etc.)
  • Use of SQL Database or MySQL
  • Simple and fast to scale from free tier to shared tier to dedicated tier
  • Web Jobs
  • Backups of Web Site content
  • Built-in web-based debugging tools (simple cmd/powershell debug console, process explorer, diagnostic tools like log streaming, etc.)

With the April 2014 and September 2014 rollouts, there are now some features common to both Web Apps and Web Roles (and Worker Roles), including:

  • Staging+production slots
  • Wildcard DNS, SSL certificates
  • Visual Studio integration
  • Traffic Manager support
  • Virtual Network support

Here's a screengrab I took from the Web Sites gallery selection form: enter image description here

I think Web Apps are a great way to get up and running quickly, where you can move from shared to reserved resources. Once you outgrow this, you can then move up to Web Roles and expand as you need.

like image 119
David Makogon Avatar answered Sep 28 '22 23:09

David Makogon


EDIT 2014: For what it's worth, a lot of the info in this answer is no longer correct - see comments.

Add more to @David response:

With Windows Azure Websites, you don't have control over IIS or web Server because you are using a resources slice along with hundreds of other website on the same machine, you are sharing resources like any other so there is no control over IIS.

The big difference between a website shared and Azure web role is that a web-site is considered process bound while roles are VM bound.

Websites are stored on a content share which is accessible from all the "web servers" in the farm so there is no replication or anything like that required.

Windows Azure websites can not have their own host name instead they must use websitename.azurewebsites.net only and you sure can use CNAME setting in your DNS provider to route your request exactly same with previous Windows Azure Role only when they are running in reserved mode. CNAME setting is not supported for shared websites.

like image 28
AvkashChauhan Avatar answered Sep 28 '22 23:09

AvkashChauhan