|
Part 1: Hosting on the cloud
Cloud computing is
quietly taking over the world and changing the way we use our computers
forever. Whether you're storing your photo collection on Flickr or
logging on to Gmail, everyone's now using the cloud, even if they don't
realise it. But how does it work and how can we as web designers and
developers make it work for us?
Cloud computing runs on virtual servers.
Rather than being a single physical box, a virtual server runs as part
of a physical box. This type of virtualisation is nothing new and has
long been a cost-effective entry-level solution. Virtual machines on the
cloud run on clusters of servers. Again, this is nothing new: most
medium-to-large server set-ups involve clustering.
Hardware as a service
The big difference with cloud hosting is that it
packages all of this up so that it's 'Hardware as a Service' - the
clustering, virtualisation and resilience are all a given. The virtual
server on the cloud runs across many thousands of servers, in different
data centres in different locations: an entire 'cloud' of servers.
In terms of server architecture, this looks
like an obvious progression. In terms of users, developers and business,
the implications are as big as the cloud itself.
The move to cloud hosting requires a shift in
mindset similar to that when stepping away from apps stored on your own
machine to those managed on the web. In the same way that Google Docs
means you no longer have to install Microsoft Word, and Spotify means
you can listen to music without downloading it from iTunes, with cloud
hosting there's no longer a need to lease a server: you can use as much
or as little as you need.
Hosting on the cloud
The big player bringing cloud hosting to the
masses is Amazon Web Services (AWS), and its timing couldn't be better.
Economically, we're living in uncertain times. When it comes to
upgrading a 12-month hosting contract or trying to justify another
capital expenditure in terms of new hardware, painful decisions need to
be made. But with cloud computing, there's less need to worry.
Because you pay for what you use, rather than
having to buy upfront what you think you only might use, cloud hosting
provides the ultimate pay-as-you go hosting solution. Rather than
compromise on performance or scalability, you can just host on the
cloud.
As Amazon's CTO, Werner Vogels, put it:
"Anything is crappy, whether it's your hardware, your network, your
operating system. Don't let anyone tell you that this stuff is
unbreakable; if you have enough of these things sitting around, they all
break all the time." This is the philosophy with which the Amazon
infrastructure has been set up.
As such, AWS cloud hosting is set up over 19
different data centres globally, each with different power connectivity,
internet connectivity and geographical location. What happens if one of
these data centres goes down? Well, they do go down all of the time:
Amazon pulls the plug on one of its data centres monthly, as a real-life
rehearsal of what would happen in a fire.
Hosting security evolves
In the old days, many a CTO used to think that
the safest place to keep a server was in the office: that way, security
could be ensured by fixing the latest in window locks and alarms and
ensuring the night security guard had enough coffee. Of course, this
approach was about as resilient as keeping your hard-earned cash under
the floorboards.
The next approach to hosting security was to
put your server in a data centre, with managed security and support.
This approach has proved sufficient for many, but it's as limiting as
putting all your money in a bank. And as we've all become aware
recently, having all of your savings in one bank is something to be
discouraged - if it goes down, so does your business.
Now imagine putting each one of your pounds
(or dollars - ed) into a different bank account. If you did, then should
one of the banks fail, you'd carry on as normal. The same can be said
for cloud hosting.
Developing on the cloud
At 3ev , we approach cloud
hosting with enthusiasm, because essentially it enables our techies to
get their hands on as many servers at any one time as they like.
Previously, we had a couple of collocated live
servers for all of our hosting requirements, and setting up an
additional box to test something out on was painful, both in terms of
expense and time. Additionally there was a certain level of commitment
involved: we'd have had to have that server for a minimum of a month,
when often we'd just want to set something up for an afternoon.
Nowadays, on the cloud, the virtual machines
look just like normal servers. You can sign in, move stuff around and
even install software. So what's actually different?
|
First, it's
brilliantly easy to take snapshots. You can take a snapshot of your data
at any time you like and, because you can buy as much storage space as
your requirements dictate, you can just keep going. Working with this
level of agility means that if one of your sites needs some immediate
and risky maintenance, this is easier than ever before.
You can instantly clone it onto a new server -
and work on the clone - in the "live" environment. With the cloud you
always have spare servers sitting around, should you need them.
Part 2: Scaling on demand
If your app or site hasn't been on larger
infrastructures before, you'll need to make sure it can scale well.
Dedicated hosting tends to encourage coders to build for a fixed number
of machines, but cloud hosting needs a more scalable approach. If you're
scaling on demand, the number of machines can shrink and grow
automatically, so your app needs to be able to cope with this from the
ground up.
This is a big area, so the best approach is to
fire up a few instances on EC2 and find out whether it scales. It's
possible to rehearse for any eventuality, which is useful when running
sites and apps prone to spikes in traffic. Test instead of guess.
This ability to rapidly scale your application
and have the privilege to instantly throw dozens of servers at a
problem aren't things that anyone had the luxury of until cloud
computing became available.
The cost of scaling at short notice is also
surprisingly cheap. Amazon provides backup onto the cloud through its S3
service (Secure simple storage). Rather than backing up your data once,
S3 makes six copies, all in different locations on different hard
disks. S3 can be combined with EC2, meaning that you can turn servers on
and off with unprecedented ease and can cater for any eventuality, both
planned and unforeseen.
Cloud hosting makes it entirely possible for
serious e-business to be within reach of any developer with ideas. The
set-up cost of a cloud server running on Amazon is 10 cents plus a valid
credit card. From this initial set-up, you can scale up to running
many, many different instances of the server - with no additional lead
time or further contracts to delay the process.
Benefits to business
The implications of this are already benefiting a
large number of businesses that, without this low cost of entry, simply
wouldn't exist. For instance, in December 2007 the social networking
games company Playfish launched a game called "Who Has The Biggest
Brain?"
Since then Playfish has grown exponentially.
It's currently responsible for most of the top ten games on Facebook and
provides games to more than 50 million users. Scaling an operation such
as this using a traditional set-up would have been prohibitively
expensive and unreliable. With user numbers increasing by up to one
million in the space of 24 hours, there would have been moments of poor
service and downtime where the infrastructure just couldn't cope. Not
only did cloud hosting make the initial outlay affordable, it made the
entire solution more agile and made scaling more responsive.
The traditional way of scaling often either
overcaters or under-caters for demand. The lead times involved in
setting up, getting the capital expenditure authorised, even configuring
the new boxes the same as the existing ones, all introduce unnecessary
delay. It's a constant game of cat and mouse between demand and
capacity.
Coping with demand
With cloud hosting, you don't need to worry about
any of that. A new server can be powered up in a matter of minutes and
configured exactly the same as your existing one using a simple
configuration tool. Similarly, if your demand falls off, you can turn
these extra boxes off as easily as you turned them on. Cloud computing
takes the infrastructure and scaling costs out of professional hosting.
As such, the ground is fertile for new web
ideas that previously just wouldn't have been possible. Just like open
source software, cloud hosting reduces the cost of failure. Everything
(is run) as a service(:) With storage, backups, music and even operating
systems such as GOs (thinkgos.com) being run as a service, personal
computers will become smaller, lower spec and ultimately cheaper.
There's less for them to do, as everything is
done on the cloud. This phenomenon is known as thin-client computing -
we'll able to run all of the apps we currently run on our laptops and
PCs on the cloud. Gartner has predicted that worldwide netbook sales
will grow from just over 5million in 2008 to 7.8million in 2009. That's
more than 50 per cent growth, compared to a predicted 15 per cent growth
for the entire laptop market and an overall decline in sales for
desktop PCs.
Music need no longer take up bags of valuable
space on your hard drive. Ownership is old hat. Run your digital life as
a service. There's just no escaping the cloud!
|