Penny Pinching in the Cloud: When do Azure Websites make sense?
I had a great conversation on Twitter with Frans Bouma about pricing where he asked a number of questions that weren't easily answered in 140 characters. The pricing for these things isn't clear or easy. It's not clear or easy because it's complicated.
Frans is thinking about moving his product’s website over to Azure but he’s thinking it’s too expensive for his one website. Good question.
Here's my own Q&A about Azure Websites and Pricing. Folks are always emailing me with confusion so I'm writing it up. If you email me questions from now on (since I have only so many keysleft.com) I'm going to point you here.
Disclaimer: This is written by me, not Marketing. I'm sure they'll be on the phone in a minute when they see this post. It doesn’t make it less true, though.
I wasn't an Azure fan until June of last year. I run all my sites on Azure except for this blog (which is at OrcsWeb where it's been for years).
Today, I have 13 websites and two VMs (one Linux and one Windows) running in Azure. 11 sites run in one VM instances with Azure Websites in the West US, and the other two are in different datacenters.
Q: I have a small website on a custom domain that I'm paying US$5 a month for at FooHost. Should I move to Azure?
A: Probably not. While you can get 10 free websites per data center (meaning, more than 10, technically) to play in Azure, if you want to point a custom domain at it you'll need at least one "shared" (multi-tenant, meaning you get a slice of a CPU) website. That's US$9.68 a month, running full time. If $9.68 is too rich for you, stick with your $5 host. However, you do get to use the same management tools and deployment subsystems even with just one shared site so it depends on what you find valuable. Free sites are great for development and test scenarios where you can experiment with new concepts before you start spending money.
If you’re trying to get by with the minimum for a few bucks a month, I don’t think it’s fair to compare Azure to a random $4.99 PHP host. You get command line management tools, lots of deployment choices, elastic scale in minutes whenever you want, etc.
Q: What if I am OK with $10 a month? What do I get with one shared site?
A: Whether it's 1 site or 500, all websites get Git deployment (and redeployment, also known as the "oh shit button") as well as deployment from Visual Studio and TFS. Everyone gets the same infrastructure and control panel. You can also scale out to up to 6 shared instances if you need.
Each instance is a copy of your code running on a different shared server with its own quota of CPU and memory. We chose to limit the number of instances to 6 since having more than 6 instances ends up being more expensive than having one Standard server. You can have up to a 100 sites in Shared mode per data center, each site can have up to 6 instances.
Q: What about running my own VM and not using managed Websites?
A: If you know what you're doing, you can run your Website in a VM, but you need to setup IIS and manage it yourself. You need to keep the VM updated, and configure it however you want. But, you can get an extra small VM for $15 a month with 768MB RAM, which is nice. I run an instance of MySQL in one of these as well as PHP on Apache.
Q: When would I run a VM over a Website?
A. It comes down to what you want to manage. If you're cool with managing a VM and you want the flexibility, do that. If you want the OS and updates handled for you, as well as the deployment choices and scale out, use web sites.
Q: There's Free, Shared and Standard Websites. What's the difference?
A. Free means it's free, there's no uptime guarantee and you're low priority. I put demos and tests and dev on free stuff. I also run some services where it doesn't matter what the URL is because no one can see it. You can't use custom domains or SSL with free.
Shared means you're getting a slice of a computer and you're packed in with a lot of other folks on the shared plans. Most small websites (<20,000 PV) work just fine with shared.
Standard used to be called Reserved. You get your own VM and you can run ASP.NET, nodejs, PHP, etc (the same things you can run on Free and Standard). You can go from 1 core and 1.75G of RAM all the way up to 4 cores and 7G of RAM. I run all my sites in 1 standard small instance. Even with small I've got almost 2 gigs of ram and even though some of my sites (like Hanselminutes) do caching and may use 100-300 megs of RAM on a busy day, I've never had any issues.
If you need more than one server to run your sites you can scale out to 10 instances of your Standard server, if you need more than 10 server instances you can contact support services and they’ll work something out.
Here's the thing about clouds generally and Azure specifically. If you're not packing things densely you're not going to save money.
You can put up to 500 websites into a single instance using Azure Websites. That's not a typo. The more you put in the more value you get from your VM/standard instance.
Tip: Pack sites in tight. To be clear, if you are going to run more than 8 websites in Azure, you're a tool to not move into Standard/Reserved. It's just cheaper. Plus, if you have a bunch of sites in one Data Center (like, I had 10+ in West US) you want to put them all in the same VM. If you can keep serving traffic then effectively all sites you can put comfortably in your existing instance are "free." You're paying for the instance, use it.
Q. You're insane, what kind of sites could provide value and also be packed that tight?
A. There's lots of little sites, like my podcasts for example, that get a few tens of thousands or even hundreds of thousands hits a month. If you're working for a digital agency and putting together simple sites, you can start saving big money after about 6 to 8 sites.
Here's the Azure Pricing Calculator. In my opinion it's silly that it goes past 8 in Shared mode. Anything more than 8 shared sites is a waste of money.
You might look at this and thing, 8 for $77? That's real money and too rich for me. I'm going to stick with my $5 host. And you probably should if you can pack 8 sites onto that $5 machine.
However, things get cheap when you move to Standard mode. Once you have 1 standard website VM you can put lots of stuff on that one machine.
Again, each web site is all alone, isolated and separately deployable and manageable, but they share your 1 VM. But the value is that you never think about the management of the VM. It's always up to date, they're looking for malware, patching the OS, handling stuff. Web Sites sits above the VM and you use FTP, Git Deploy or MS Deploy to get your site there. You can run ASP.NET, PHP, node.js, Python, hell, Classic ASP if you want to.
You're paying for the compute time, 0.10/hr and you're being billed as it's running. If it runs all month long it's $74.40. I run all my sites inside this VM. It's actually a little large, and I could probably get away with an "Extra Small VM" if they would make one for Web Sites (the team is telling me that this is coming soon). Note that I am charged 0.10/hr even if my sites get no traffic, I am essentially paying for “renting” the CPU from Azure.
Q. When do I scale, and how?
A. I talk to customers a lot and most of the ones doing public sites always overstate their traffic. What they want is the ability to scale IF it becomes popular. You can scale UP (bigger instance) or scale OUT (more instances).
You can set you sites to auto-scale if you get on Hacker News or your startup becomes popular. Azure will add (and remove!) instances to make sure traffic gets handled. It will never go above or below the settings you choose.
This is a way to control costs. In this screenshot, I will never go above 3 instances, so my site can fall over if it gets slammed, but I decide how hard it tries to scale. I want to balance costs with availability. I could change this however I want from just 1 small VM to 10 large ones, so that's 1 core to 40, as I like.
Q: Are Azure Websites running all the time, 24/7?
A: If you have a standard VM with a bunch of websites in them, the VM is running all the time and you're paying for that VM. If one of the web sites isn't used for some large number of hours, it will be put to sleep, freeing up resources for other sites on the same VM. If you're worried about the web site not warming up quickly, you can use the build in Monitoring feature to not only ensure they are always up but that they are always warm.
Q: I’ve got an MSDN Subscription, what does that get me?
Link your MSDN and Azure accounts and you can get up to $150 a month in Azure credits, so up to two free VMs running all day for a month.
I've done a few posts on "Penny Pinching in the Cloud" that you may enjoy.
- Penny Pinching in the Cloud: Enabling New Relic Performance Monitoring on Windows Azure Websites
- Penny Pinching Video: Moving my Website's Images to the Azure CDN (and using a custom domain)
- Penny Pinching Video: Moving an Azure Website between data centers
- Pinching pennies when scaling in The Cloud - lazy loading images and using the Azure CDN to save money
- Penny Pinching in the Cloud: How to run a two day Virtual Conference for $10
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
http://screencast.com/t/bYQIixVt5c
Apparently mine hasn't switched over yet, so I can still push that button and run production sites. But, I don't so I'm not worried.
BOb
https://www.windowsazure.com/en-us/offers/MS-AZR-0045P/?currency-locale=en-US
BOb
I think what stops many small developers is that on a shared web host we know the performance and quality can't compare, but we are able to get hosting for not just 1, but multiple sites (sometimes unlimited sites) plus databases for each site for less than $10/mo and a lot of times performance is adequate especially if your site isn't heavily visited.
Going from that to $74.40/mo for web sites + maybe $50/mo or more for an sql server VM is hard to move to for the really small developer.
Unfortunately the pricing all falls apart if you want to use SSL for your sites (particularly IP based). I often work in an agency setting building a lot of small sites, but since they are content managed the administrators logins etc should really be protected.
Is there any hope for those of us that believe in security and privacy but also run a lot of small sites?
Thanks for the tip about the Monitoring feature ensuring the site is always warm. Up till now have been running a keep-alive routine with a PS script on my desktop.
Finally, BizSpark offers a great option for those that qualify. PilotBob - you *can* use your MSDN benefits for production purposes if your MSDN subscription comes from BizSpark (per Scott Gu). I just hope my app's usage improves before my BizSpark benefits runs out, because I'm hooked on Azure.
On thing that I haven't figured out, and perhaps I haven't looked hard enough is: Do you need to be running multiple VM instances to get respectable uptime?
I remember with plain-old-azure you were supposed to run multiple instances to get good uptime. Is this abstracted away with websites so you only have to run 1 instance, or is it just not that bad in practice?
Am I off track? I hope that made sense.
Thanks for the post. This is very helpful. Is there anything similar for the database side? It's great that I can run a bunch of sites on a single Standard VM, but if I'm going to get hit with $10/month for ClearDB for each of those sites that needs a database then it kinda feels like we've only solved half of the problem?
Good insight, but I think that when running a website on Azure you are also charged for any outgoing traffic - which can have quite an impact on the cost, if you're i.e. streaming video?
@dc - good question about databases. And what if we need MySQL? There's not many sites I work on these days that don't have some sort of database.
Are there any Azure credits for those who have MSDN via a MAPS subscription?
What's confusing on the Azure site is whether or not a "database" on Azure implies a single database or if it's a single database "instance" with the capability for multiple separate databases within.
We're also growing somewhat rapidly - 100 of those sites are new in the past 14 months - so it seems like expansion would be so much easier in the cloud, but, not knowing how to migrate from what we have now to Azure just makes it difficult to put the business case together.
What's worse is that these are all minor sports websites, most of which are hockey, so there is a clear "in season" and "off season" for our servers. When in-season, we do bump up against hardware limitations occasionally with an average of 150,000 visitors per day; and that goes down to just a trickle (10K / day) during the summer. Seems like it would be the perfect fit for Azure if we can figure out how much the databases would cost.
And on another note - I've never seen from Microsoft any sort of *free* professional migration assistance program. Microsoft seems to assume that moving to Azure is easy and people will take the time to learn how to do it. I just don't have the time though. What we have right now works, and that IS the most important thing. Moving to something better sounds nice and all, but if there's a chance of downtime or errors then in my opinion it's not worth risking. I don't have the time to become an expert on Azure until after we're using it - so if Microsoft wants my monthly money they need to step up to the plate and be there to help at the start.
Great post, thanks!
I found myself quite confused on the Calculator page as there is not enough clarity about what different services provide.
What about having website(s) and SQL database(s). Quite a lot of options here: Free Azure website + Azure SQL, VM with website and SQL on the VM, VM Site + Azure SQL, etc...
Thanks so much for writing this post! It all makes sense now and I can make a case for it to my boss. Having a follow up on SQL sizing and pricing would be most excellent.
PS: If marketing comes down on you it won't be for speaking... It will by someone who is made that you did a better job than them.
Thanks Again and keep up the great posts/podcasts - TDL and RAtG.
the only downside as mentioned is of course
"Can I use my Windows Azure MSDN Dev-Test subscription to run production applications?
Windows Azure MSDN Dev-Test subscriptions are specifically for Dev-Test usage only. Production workloads must be run on regular subscriptions."
as found on http://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/ (at the bottom of the page)
When should I use Web Site vs Web Role?
In comparison, on Amazon's S3 this 1TB will cost you $95, which is lower but comparable to Azure's VM cost of 1TB traffic of $122.
1TB MP3 traffic for a podcast means about 20,000 plays a month. You sure you can't monetize this?
Question: Does the "Shared-Mode" still have that 240 minutes / day CPU usage limit?
If so,
1) Is that counted in minutes? seconds? (ie, will 1 second usage "count as" 1 minute)...so if we get 240 random single-1-second page hits throughout the day, will our site get blocked until the 24 hr clock runs out?
2)If (any which way) our 240 minutes gets used up, can it auto-scale up to reserved for the rest of the day?
Thanks again for all that you bring to the community Scott!
Cheers!
Boris and CMike - Yes, and it gets cheaper the more TBs you send outbound. See the CDN details, it's pretty clear, and competitively priced. http://www.windowsazure.com/en-us/pricing/details/cdn/
CMike - You're getting a great deal, but it won't last, just like unlimited data on phones didn't last. You are getting that pricing, I suspect, because your peers at the same host don't use theirs.
Brad - Yes, when Websites supports Extra-Small it's gonna be sweet.
Luiz - Web Roles are totally stateless and scale differently. Web Sites are "IIS in the cloud." while Web Roles are theoretically more scalable and flexible for other workloads that aren't just serving pages.
JeffPutz - Yes, load balancing is automatic across instances. That's part of the value. You just have more, and it round robins (assuming your code isn't doing something dump like writing state to disk).
JeffPutz - Also, yes, that is confusing. When you make a new websites in the same location (West US) for example, it will jump into your VM unless you say otherwise.
Patrick - Assuming someone notices, yes, that's true.
Kevin - I will ask about SSL and get back to you.
Shaun - Good question. Out of curiosity, have you tried using System Center to upload your VM? http://www.techrepublic.com/blog/the-enterprise-cloud/deploy-an-on-premise-vm-to-windows-azure-with-app-controller/
I'll ask about migration. It definitely sounds like Azure WebSites would give you easier scale than your current VMs.
Shaun - How big are your DBs? If you have the SQL license, you could start by moving VMs to the cloud, then later moving Web Sites.
Brian and Darren - I found that MySQL pricing too much also, so I made an extra-small Windows VM and I host MySQL on it instead. That way there's no connection limits. That runs my Newsletter Software and Database. There's no reason you can't run those things in a VM.
Michael - Yes, inbound is free, outbound costs. If you were going to stream video, though, don't stream it from the Website! Either use Azure Storage or CDN, or Azure Media Services for on-demand streaming: http://www.windowsazure.com/en-us/pricing/details/media-services/
Don M - You'll get 99.9 or more on most all. See the SLA agreement: http://www.windowsazure.com/en-us/support/legal/sla/ Although if you need 5 nines, you'll need multiples, yes.
Tim - Then you'd want an Extra-Small when the come out soon.
I'm interested in a PPTP server that allows me to watch American instead of Canadian Netflix, would that work on azure? Does any have any suggestions on how to do it?
Thanks!
However, my question is this - in that very Twitter conversation (or a closely related one that same day) you indicated that your cost for running all you sites in Azure last month was ~$13.00. Rob Conery indicated he had run his Tekpub site, in an actual VM, for $1.26, without any special coupons etc.
Is this due to the site(s) being put to sleep as you describe above? or are we missing something? Unless I misunderstand you above, you are hosting in a "Standard" websites tier, for which (according to the above) you would be paying to "rent" the cpu all month, running or not.
What am I missing?
I love the things Azure can bring to the table, but before I move my site there, I want to make certain I understand and can afford it. All of the above in your post makes complete sense except for where it doesn't reconcile with what you and Rob Conery posted on Twitter.
Thanks. Sorry for the long-winded comment!
http://www.bradygaster.com/running-ssl-with-windows-azure-web-sites?__r=8cffeabd3a31563
I tried a few months back but couldn't get it to work quite the way I wanted it...but that probably had more to do with my limited understanding than his solution. Take a look. An extra small Cloud Service role is much cheaper at ~$15/mo.
John - My $13.00 cost was overages and using MSDN original credits, so definitely that wasn't representative of my full bill. It is true that I keep 3 of my VMs shut off (like my newsletter) until I need them. I think also that Rob was wrong and must have been either quoting prorated or using some Trial credits. I suspect his bill is more like $50 to $75. I will call Rob and straighten him out. Thanks for your comment!
Note it would be cool if the date-stamp on comments would actually be clickable URLs.
For instance your comment stamped "Friday, August 09, 2013 9:38:44 PM UTC" is actually this URL:
http://www.hanselman.com/blog/PennyPinchingInTheCloudWhenDoAzureWebsitesMakeSense.aspx#4ab569c9-3996-4411-93a9-f1df1601daca
That makes referring to comments much easier (I linked only one here because right now it is too hard: http://wiert.me/2013/08/10/must-read-penny-pinching-in-the-cloud-when-do-azure-websites-make-sense-scott-hanselman/)
--jeroen
Great post though!
1 - 10GB Database is $45.96 per month
2 - 10GB Databases are $91.91 per month
2 - 5GB databases are $51.95 per month
So it seems like there is very little overhead for each additional database. It also seems like the overhead of additional databases is smaller if the databases are bigger.
http://www.windowsazure.com/en-us/pricing/calculator/?scenario=data-management
$10/month for custom domain and SSL, unlimited web files space, free SQL Server add on with up to 20 MB Disk space.
You can buy 10GB of SQL Server space with $10 per month.
Git support.
This is ideal for developing and also until the site gets enough traffic/income to migrate to expensive hosting.
attention. I'll probably be returning to read through more, thanks for the info!
Check out my webpage ... search engine marketing (Brook)
Andrew
http://www.windowsazure.com/en-us/pricing/spending-limits/
You can set up alerts to notify you of such things like a sudden increase of traffic etc so whilst you would still incur extra from the attack you would be notified as it happens given you chance to do something about it.
How much more it cost's you is all down to your scale settings.
It's a great post! thank you.
I have a backend service for my mobile application's server-side.
i can't use "Azure Mobile Services" because its too basic, and i need my own logic and not just CRUD actions)
so i'm trying to decide if i should keep using my current method, which is a WCF service running on Web Role, that exposes RESTfull api (no use for SOAP at all.. its all simple JSON returned from those methods)
the second option is to use WEB .API with "Azure Web Site". the problem is, it seems like a little over-kill since it also gives me full web site and i don't need a web site at all, just the API part for the mobile.
I would appreciate your opinion.
Thanks alot, Liran!
by the way,
if i have 10 shared web sites, does it mean i can scale my single service (in my case, an web .api based on asp.net web site) 10 times? because i really don't need 10.. i only have 1 service. but scaling it for better performance is probably a good idea.
but right now i'm using .NET, and also using external libraries (NHibernate, PushSharp library, Facebook Library). and its all developed already, so my question still stands.
thanks
I have a free pass for the next 8 months, which gives me "10 shared web sites".. so that why i'm using it. so again, my question still stands, but thank you for the warning.
This is a great article that I keep coming back to!
If I run one website, but 2 instances on a shared instance I get no downtime when deploying.
Can I get this benefit by running 2 instances on the same standard instance?
Cheers
Is there somewhere I can turn on the non-essential, low man on the totem pole, not guaranteed to be up, free for up to 10 websites subscription?! All of the subscriptions I look at cost a minimum of $500 / mo and require 6/mo or 12/mo commitments.
I miss my git deploy and Azure dashboard :/
I read through this entire thing to help me make sense of what Azure is really all about!
Thanks
Web Sites and Web Roles each have their pros and cons (worthy of a blog post in its own right), and the Extra Small instance is, well, extra small, but for a $99/month difference in price, you'll want to know your options.
Apart from SLA how do we track that our VM is not starring for resources or CPU time?
Initially as the platform is new and you don't have enough tenents so everything looks promising.
What I mean is I have set availability for 8 VMs but what is guarantee of it meeting actual CPU time.
Let's say you have 16 VMs hosted on one physical machine. Do you dynamically more VM to different physical machine to meet promised share if all VMs demand high CPU usage?
I really want to put my site on Azure, any word on when that XS website instance is coming? I don't know how much it will cost, but something around $20-$30 a month would be reasonable enough for me to move to it.
Thanks for these great penny-pinching articles!
Comments are closed.