Sometimes it happens to start a new development project or to plan a deploy on the cloud, on Azure, but you don't know what kind of service is better to use: a WebSite, a Cloud Service or a Virtual Machine? What pros and cons do they have?
Let's deiscover the main differences.
Warning: this post is updated with the information available to August 5th, 2014.
First of all, a diagram (the same that Microsoft uses in the Azure official docs), to compare our three services:
Courtesy of Microsoft |
In this image the "simplicity / control" ratio between services is quite clear. To be extremely synthetic:
- WebSite:
- Solution extremely simple to use, it offers a good set of tools to support (monitoring, alerts, stairs, etc) but at the expense of the level of customization and control over the configuration.
- In multi-tier applications, it provides support to the only web tier
- Cloud Service:
- Less simple to use and deploy compared to Websites, provides a much greater level of control.
- Also in this case there are several tools for monitoring and support already included
- You can use both WebRoles (that actually are dedicated VMs with IIS installed) as well as WorkerRoles (always dedicated VMs, but without IIS. You can think about WorkerRole as a Windows Service)
- In multi-tier scenarios, you can use a combination of WebRole and WorkerRole to implement the web tier, the middle-tier and the backend
- In multi-tier, you can scale the frontend and the backend independently
- Virtual Machine:
- Leaves the configuration and customization completely to the user, so it's more complicated to manage but provides the highest level of control possible, as with the on-premises server.
- You can use it for any kind of application and architecture
- You need to manually deal with the management of the system, including upgrades, security policies, etc. etc.
- It's the ideal choice in complex scenarios or when you need to host software or services that are not supported in WebSites or Cloud Servives.
This is the official services features comparison table:
FEATURE | WEB SITES | CLOUD SERVICES (WEB ROLES) | VIRTUAL MACHINES |
---|---|---|---|
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 | |
Integrated MySQL-as-a-service support
| X | X 1 | X |
Support for ASP.NET, classic ASP, Node.js, PHP, Python
| X | X | X |
Scale out to multiple instances without redeploy
| X | X | X 2 |
Support for SSL
| X 3 | X | X |
Visual Studio integration
| X | X | X |
Remote Debugging
| X | X | X |
Deploy code with TFS
| X | X | X |
Deploy code with GIT, FTP
| X | X | |
Deploy code with Web Deploy
| X | 4 | X |
WebMatrix support
| X | X | |
Near-instant deployment
| X | ||
Instances share content and configuration
| X | ||
Scale up to larger machines without redeploy
| X | ||
Multiple deployment environments (production and staging)
| X | X | |
Network isolation with Azure Virtual Network
| X | X | |
Support for Azure Traffic Manager
| X | X | X |
Remote desktop access to servers
| X | X | |
Ability to define/execute start-up tasks
| X | X | |
Automatic OS update management
| X | X | |
Integrated Endpoint Monitoring
| X | X | X |
Seamless platform switching (32bit/64bit)
| X | X |
1 Web or worker roles can integrate MySQL-as-a-service through ClearDB's offerings, but not as part of the Management Portal workflow.
2 Although Virtual Machines can scale out to multiple instances, the services running on these machines must be written to handle this scale-out. An additional load balancer must be configured to route requests across the machines. Finally, an Affinity Group should be created for all machines participating in the same role to protect them from simultaneous restarts from maintenance or hardware failures.
3 For Web Sites, SSL for custom domain names is only supported for standard mode. For more information on using SSL with Web Sites, see Configuring an SSL certificate for an Azure Web Site.
4 Web Deploy is supported for cloud services when deploying to single-instance roles. However, production roles require multiple instances to meet the Azure SLA. Therefore, Web Deploy is not a suitable deployment mechanism for cloud services in production.
No comments:
Post a Comment