Quantcast
Channel: Scott Hanselman's Blog
Viewing all articles
Browse latest Browse all 1148

Penny Pinching in the Cloud: When do Azure Websites make sense?

$
0
0

imageI 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 keyleft.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 the 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 far 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.

image

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.

image

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.
image

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.

image

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.

image

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.

image

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.

image

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.



© 2013 Scott Hanselman. All rights reserved.
     

Viewing all articles
Browse latest Browse all 1148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>