The message from the cloud has always been simple: Surrender your cares, IT managers, and we’ll handle everything. Forget about skinning your knuckles installing servers, double-checking diesel backups or fretting about 1,000 or 10,000 things that could go wrong. Give us a credit card number and your data. We’ll do the rest.
For the last few months, I’ve once again been living the dream, building a vast empire of computers that spanned the globe. Machines everywhere crunched my data into teeny tiny bits, then crunched the numbers even more. Private networks carried my secret scraps of info between the machines so that others could work the data and reform it into pretty graphs. Sure, my desktop is a bit old and could use more RAM, but with my browser I created a worldwide army of machines with about as much ease as the sorcerer’s apprentice in “Fantasia.”
The good news is that, unlike the apprentice, the machines more or less disappeared when I asked them to go away. That’s the beauty of the cloud. You buy what you want, when you want it. Oh, there is one errant recurring charge for a blob of bits stuck in Microsoft’s Azure cloud, but tech support is looking into erasing that. I expect it will be stricken soon, along with those bills for a few pennies that reminded me of the blob when they appeared on my credit card statement.
All the other machines came and went with a small charge measured in cents. Most dollar stores have been artfully renamed to accommodate goods that cost less than $5, but in the cloud it’s still possible to buy machines as if they were penny candy. Someone should resurrect the old Woolworth name and the five-and-dime slogan.
Figuring out what you’re paying, by the way, is growing increasingly complex, thanks to the different ways the cloud providers are offering discounts. In the beginning, you bought your time by the hour, and the cost of one week could be computed by multiplying the hourly rate by 24, then by seven.
Now you have options. Amazon, for instance, offers “reserved instances,” a mechanism for rewarding the companies that make a one-year or three-year commitment to AWS. As they say, “The more you pay up front, the more you save. “
Not to be outdone, Google offers its own discount mechanism where the price of a machine keeps dropping the more you use it. You don’t need to make a commitment or to use the machine constantly. The price simply goes down as your usage goes up.
That’s not the hardest part of the equation because the billing models aren’t the only difference. Performance varies substantially between machines and between applications. The machines all look alike when you’re typing into the command line, but the performance starts to change based on details like how much RAM you choose and whether your app is trying to write to disk.
The architectures and applications are different enough that the smart thing to do is run benchmarks, then start multiplying out the costs. Maybe that extra RAM is worth it and maybe it isn’t. Sometimes you’ll want a cluster of N fully loaded machines and sometimes you’ll want 4N cheap machines that cost only pennies an hour. It’s not an easy decision. You’ll need spreadsheets to figure it out.
Once you start to discover that performance varies, often dramatically, from cloud to cloud and don’t always get twice the performance for paying twice as much, you start to realize there are many subtle differences behind the curtain.
Anyone who assumes that the cloud machines are merely commodities is latching on to the wrong part of the message. The marketing teams push the idea that the cloud lets you toss around computers and storage like they’re interchangeable Lego bricks, but that’s not exactly true. All the providers are trying to distinguish their machines and services by offering something a little bit different and a little bit better. It’s probably not worth your time to fret over saving a few pennies an hour if your job is going to end in a few hours, but the variations are often significant for anyone doing a large amount of work.
The deviations start when you choose the operating system. It’s easy to assume that everything’s Linux because Linux is everywhere, but that ignores the contrasts among the distributions. While many of the standard distros like Ubuntu are ubiquitous, companies have created their own versions with slight or not-so-slight enhancements. Amazon Web Services and Google Cloud Platform, for instance, have their own Linux for the cloud.
Linux is not the only choice. Many of the clouds make Microsoft Windows available for an extra charge, but you often won’t have to pay an additional fee with Microsoft Azure, at least with some configurations. Microsoft wants to attract Windows shops with services that make it easier to move more and more computation to the cloud. Anyone with a substantial investment in Microsoft technology will feel more at home with Azure.
Then there’s Joyent Cloud, which features a souped-up OpenSolaris derivative called SmartOS. It can offer faster performance for some jobs like Java, but SmartOS is mainly intriguing now because the Joyent engineers have rewired it to run Docker containers. It’s an amazing work of engineering.
Docker is, of course, another big option because developers are starting to toss around Docker containers as they used to ship around virtual machines. All the clouds say they offer plenty of support, but there are subtle and not-so-subtle differences under the hoods. Joyent’s option is good for bare-metal performance. Google, of course, makes it easy to use its Kubernetes tool to spin up clusters of containers. Azure lets you choose between Mesos/Marathon and Docker Swarm, and Amazon has its own way of scheduling containers. Running containers is a do-it-yourself project on IBM Cloud (aka SoftLayer), whereas you’ll find container management services on IBM Bluemix.
While all of the cloud machines are meant to appear to be indistinguishable from buying an Intel box and putting it in your own rack, the reality is they’re often hefty multicore blades that are sliced up into virtual machines for your consumption. You’re not renting a single family home on its own plot of land -- you’re signing up for a condo or a timeshare. The container code, the OS, and the hypervisor all enter into the game. The more layers, the slower the machine. The only way to know, though, is to test.
One place where the effects of virtualization is felt heavily is in data storage. Databases rely heavily on the speed of the I/O channels to the disk drives, and every extra bit of virtualization can slow them down. Some clouds aren’t doing much to address this because they probably assume everyone wants to run their own database machines.
All the clouds offer object storage. You give them a bag of bits, and they promise to return them later. It’s not a bad way to store data. It’s highly reliable and extremely flexible.
There are fancier options with more sophistication. IBM Cloud, for instance, offers MongoDB on separate machines that are specially tuned for the workload. Similar options are available in all the clouds with similar databases. Google offers four basic options like Cloud Datastore, a NoSQL product, and Cloud SQL, a version for those who still like SQL. Microsoft, of course, will host its very own SQL Server in Azure. Amazon offers the gamut of database services, including its high-performance twist on MySQL.
Other services emphasize different performance attributes. Amazon has a wide collection of data storage solutions that will take bags of bits and return them later, but the most interesting may be Glacier, a service designed for when the retrieval times may be “several hours” -- not milliseconds, seconds, or even minutes but hours.
Then there are the more revolutionary approaches like Joyent’s Manta, a system that brings the computation to the data instead of the other way around. Joyent calls it a “distributed object storage service with integrated compute.” Your objects float out in the cloud. When you want to query them, you can write code that runs locally. Manta supports R, Python, Node.js, Java, and a few more.
Of course, it’s still possible to grab another machine and install your favorite storage option, but these managed solutions can be tempting enough to make the decision for you. If one cloud has the kind of data storage layer you like, you can usually live with the other tools.
Another topic to obsess about is networking. Some clouds -- such as IBM Cloud -- offer private networks that link the machines. It’s easy to create a database machine that listens only to this private network, which leaves it a bit safer from the kinds of assaults that come in through the public Internet. It’s not a perfect technique because security in the cloud is, well, a cloudy subject, but it’s a great first start. For even more isolation from the proverbial noisy neighbor, you can go with IBM’s bare-metal instances.
Some of the other providers offer more elaborate geographical distinctions regarding the parts of their cloud. Knowing more about where your machine is located can help you make decisions about where you’re going to park your data. Especially paranoid staff with especially valuable data can create an empire of machines and arrange for the data to be duplicated in different geographical regions to gain better protection against storms, fires, and other local cataclysms. Google, for instance, is very transparent about the cost of bandwidth between the separate data centers, and it prices these transfers differently than the flows between machines in the same center.
Bandwidth costs have the potential to be confusing. The clouds typically charge nothing for incoming traffic, a trick that simplifies the metering and accounting while building a sort of roach motel for your information; the data moves in but doesn’t want to leave. If you’re creating a big, number-crunching machine like the one from “A Hitchhiker’s Guide to the Galaxy” that will suck up plenty of data but return only one number (42) as the answer, data plans like this are attractive. If your goal is to compete with YouTube, on the other hand, you’ll want to pay close attention to the egress rates.
Beyond the basics
The most interesting parts of the cloud are the special-purpose machines. Even if they aren’t generally useful for the PHP code you have to get running today, they promise to make it dramatically easier to tackle challenges in the future. Amazon, for instance, has a set of video cards (GPUs) ready for any experiments that you can dream up and cast into algorithms that are easy for these cards to execute. Physicists, biologists, and computer scientists are already converting their algorithms to run on these cards. It’s only one example of how the clouds are making it easier for all of us to experiment with new architectures.
These special stacks don’t always require special hardware. All of these cloud providers offer special Hadoop machines to feed the frenzy. They’re tuning the underlying operating system and optimizing the JVM for better performance. Joyent claims that its machines run “nearly 3x faster.” Do they? It depends upon what you’re asking the machines to do. Amazon, for its part, has a cloud of machines that take Hadoop jobs directly and let you bid for computer time on spare machines.