\\[Editor’s note: Welcome to “.NET Rocks Conversations,” excerpts of conversations from the .NET Rocks! weekly Internet audio talk show. Hosts Richard Campbell and Carl Franklin chat with a wide variety of .NET developer experts. This month’s excerpt is from show 565, “Steve Evans Compares Amazon and Azure.”\\]
Carl Franklin: I guess I should give you a proper introduction, should I not?
Richard Campbell: He went to the trouble of supplying you with a correct bio. That's something.
Franklin: Steve Evans is an IT Pro with over 10 years of experience. He is a Microsoft MVP in Directory Services, a MCSE, and an accomplished speaker. He also has a background as a developer. He bridges the world between developers and IT pros and frequently speaks at code camps, user groups and other technology events. Steve publishes a technical blog at serktools.com. You can follow him on the Twitter username @scevans where you can interact with him and get updates on his upcoming screen casts, podcast appearances, and live webcasts. Welcome back, Steve.
Steve Evans: Thanks for having me.
Franklin: So we're talking about the cloud today.
Evans: You know, depending on who you're talking to, they're going to tell you that the cloud is going to solve everything in the world. So if you've talked to Microsoft, they're going to tell you Azure solves everything in the world. If you talk to Amazon, they'll tell you their solution solves everything in the world. People are sticking cloud on any product they have regardless of if it has anything to do with cloud computing.
Franklin: I agree. It's synonymous for anything on the Internet.
Evans: Right, exactly. So I just wanted to talk about the pros and cons of the different cloud solutions, and also what are the pros. and cons of doing it in-house or in the cloud.
Campbell: Where do you start?
Evans: First, let's talk about traditional computing. We've had physical servers since the dawn of time and then virtual servers came along and these are great because you can do anything you want, right? But you're also responsible for everything. Let's think about what's required to have a server operating. First of all you need planet Earth but we'll knock that off as accomplished already, but you need some type of environment so you need space to put the server, you need power, and you need some type of cooling, you need a network, you need the hardware, you need the software like the operating system, the web server, the SQL server, the load balancer, security systems, the monitoring systems, you need someone to fill that IT pro role, you need someone to set all that stuff up. Sometimes the developer is doing that, sometimes you're hiring someone to do that, and then you need the application on top of that.
Evans: When we have traditional physical servers, whether we have them in-house or they're at a company like RackSpace, all that has to be taken care of. You have a lot that you're responsible for. You also have a lot of upfront capital cost. You're spending a lot of money just getting going. The cloud solves two things. First of all is that upscale or that upstart capital cost—so it's the pay you go model. The other thing is that you get that scale up or down very quickly so you can quickly add or remove resources to your solution. That's what we are getting out of the cloud. Now, the big thing that has come up lately on the traditional computing front is virtual servers. My only comment is “go virtualization.” You get the hardware redundancy for free with either Live Migration or VMware as VMotion, and then you abstract away your hardware. So you can upgrade your hardware at a different time than you're upgrading your applications which I find for a lot of my clients it's a big deal for them. They're not saying, well, we have to upgrade the operating system now because the hardware is three years old.
Franklin: You've mentioned Live Migration. That's something that developers might not be familiar with. What's that? We may have to figure the output.
Evans: Windows Hyper-V Live Migration or VMware VMotion is a technology that allows you to have multiple virtual machine servers and your virtual machines are running off of some type of backend storage. You know, so in that upper EMC SAN and that allows you to move a running virtual machine from one physical server to another physical server and it does this in the middle of operations. So let's say I had a virtual machine that was Microsoft SQL Server and I'm running a query against the SQL Server, and for whatever reason the system decides to move my virtual machine from one physical host to another physical host. With this technology, that machine can move seamlessly from one physical machine to another. That means the client hitting that SQL Server has no idea it has ever moved. You might move a machine from one physical machine to another if you have some type of hardware maintenance that needs to take place. Let's say you need to move a physical server from one rack to another, or let's say you need to install system patches on the host operating system, or let's say that on a physical machine you might have 10 to 30 virtual guests running on it and as the load changes throughout the day you might shift around those guest machines based on load. So if one physical machine is overloaded, you can move the guest machine around to balance the load out.
Campbell: Now Steve, you've dropped a couple of interesting tricks here that are not as simple as they make them sound. But the big thing about the SAN side of this and that upper EMC is that you need very fast storage that can be shared across multiple machines. That's not a cheap or simple thing to set up.
Evans: True. So all of this running the hardware yourself is not cheap or simple.
Campbell: No. This is a couple of hundred grand with the gear and a really experienced guy. Like actually making seamless failover work is a bear.
Evans: I think virtualization is definitely one of those things where you can do it cheaply and poorly, or you can actually throw the resources behind that you need to and do it right. I definitely see a lot of people go out and buy a $4,000 server from Dell and they decide, well, we'll just make this a virtual machine around everything on it and then they're surprised when they don't get the performance they want out of it. You know, virtualization doesn't just provide you free computing resources. You still have to buy those resources. You're just splitting up your physical machines into smaller ones. You still have to really devote the resources you need to it. I don't know if that necessarily means you need $200,000 worth of backend storage. I mean, it would depend on how much you're trying to do with it but yeah, you have to do it right. My clients bring me in because they're not happy with virtualization. They're talking about virtualization doesn't work that well, we're thinking about going back to just straight physical host. It's not that the virtualization doesn't work well. I mean, Hyper-V and VMware are two great solutions.
Franklin: Now we started this conversation by saying no matter what you're doing, if you're building a local datacenter or you're going to use a cloud system, you should be virtualizing first.
Evans: We did?
Franklin: Isn't that what you said?
Evans: No. What I'm saying is if you're not going to go with the cloud, go with virtualization.
Franklin: Oh, okay. Don't some cloud solutions offer to run your virtual machines as is?
Evans: There are probably some out of there that do that. I don't think you could call that cloud computing though. One of the tenets of cloud computing is elasticity, so I can scale up or down very quickly. VMware or Hyper-V doesn't really provide elasticity like that. Now it's a lot easier to add an additional virtual machine. It would be very easy to say, okay, this machine gets an additional one gig of RAM or an additional virtual CPU. But it’s not the elasticity of a scale of cloud computing where you can say, okay, tomorrow is going to be a big day. I'm going to double the number of computers that are running my application right now. Or, you know, it's now the weekend, let's start pulling resources offline and then bring them online later. The other thing is that if you're running virtualization internally or you're paying someone to run a VM for you, I mean if you're running internally you're paying for those resources whether you're using it or not. And if you're paying someone to host the VM for you, usually the pricing model there is—we'll host this VM for X number of dollars a month, as opposed to the cloud model where it's—we'll charge you X number of cents per hour per machine.
Campbell: The big thing with the cloud computing is if you don't use it, it doesn't cost you very much and when you use it hard it costs you more.
Franklin: Well, that's the way it should be. That's not always the way it is, is it? Sometimes just if you have things running even though they're not being hit or being used, you're going to get charged for it.
Evans: Well, that depends. So yes, if they're running you're going to get charged for it. They don't really charge you based on how much is getting used. They're charging you based on if it's running or not. Where your changes in price per hour come in is how many instances you have per hour so you really only need one instance to have your application running traditionally. So if you're choosing to have 20 instances of your application running when you only need one, you're going to pay 20 times still even though you have 20 instances barely doing anything.
Evans: You need some type of system in place to scale up and down as your application demands to change. But back to the virtualization story real quick, I'm finding clients now that have a physical machine running one virtual machine and that virtual machine is assigned virtually on almost all the resources of the system. Maybe it's a SQL Server and the virtual machine assigns all the RAM available in that physical server, but the advantage it gives them is they can pick up that VM and move it to another piece of hardware without affecting the application. So virtualization gives you this hardware redundancy for almost no cost.
Campbell: It's just the ability to abstract away from the hardware. I've done an app where I've been able to point it at a different machine and just have it move it over. But the big thing is the upgrade cycle. You're playing the difference between the virtual machines and the physical hardware. You know, I can light up lots of virtual machines inside of one computer, but if I'm having scaling problems I probably need more hardware and that takes more time to light up although building up a new host machine doesn't take very long, I mean you just populate it with VMs.
Evans: Yeah, exactly. So adding a physical machine to your VM cluster is faster than bringing in new hardware, adding it to your SQL cluster, adding it to your Web Farm, etc. So if you're looking for the quick scale up or scale down capabilities, that's when you're going to want to start looking at the cloud. There are two different major cloud solutions. The first one is called IAAS, so Infrastructure As A Service. The other one is PAAS, so Platform As A Service. IAAS is what Amazon Web Services is. This looks very much like the VM solution. With Amazon Web Services, you get a virtual machine in the cloud and you pay a few cents an hour to run that virtual machine. Amazon's solution is called EC2, Elastic Compute Cloud, and for a Windows EC2 instance it costs as little as 12 cents an hour, which works out to roughly $87 a month. Now for that $87 a month, you get a 32-bit machine that has 1.7 gigs of memory and what's called one EC2 Compute Unit. An EC2 Compute Unit is a one gigahertz Xeon processor or the equivalent of one gigahertz Xeon processor. So a large instance has, for example, four EC2 Compute Units and that works out to two 2 gigahertz processors roughly. So the thing with EC2 instances is when you power them off they disappear. It's not like you power them off and you can turn them back on and they come back up in the same state. When you turn them off, they no longer exist so you have to design a system where when the instance has come online they configure themselves.
\\[There’s much more: To listen to or read the full interview and dive deeply into a comparison of Amazon and Azure, go to www.dotnetrocks.com.\\]