Day 1. Nothing clever and nothing new
Wednesday, February 24th, 2010Here’s what’s clever about cloud computing: it’s nothing special and nothing new again and again.
Here’s what’s clever about cloud computing: it’s nothing special and nothing new again and again.
I’ve been reading lots about using git for deployment, but it doesn’t feel right. We’ve used SVN and git for deploying to single servers for years but I still think it’s fiddly and nasty. If I was forced to .jar it all up and deploy it would this make me a cleaner development. I dunno, so I asked StackOverflow.
We setup our Rackspace Cloud account for internal development today and it is nice…
We’ve been using Amazon Web Services for a few years now, and I still really like what they have to offer, but it must be said that Rackspace have thought about making things cuddly. Before we got into AWS, we were using Rackspace for dedicated hosting but never go around to trying their cloud hosting because…. well, just too busy.
Then they asked us to build their website for them and gave us some lovely VMs and access to Cloud Files.
The interfaces Rackspace have made are nice than those Amazon provide, in my opinion, but it’s worth thinking about why. Amazon went into cloud computing thinking they’d be the British Sugar of the industry: sell the fundamental commodity, encourage an ecosystem around them and bring in the popular and proven. Nice.
Rackspace are all about support, so you might be reselling their services but as far as they’re concerned you’re the end user, and you feel it.
Anyway… first day so let’s see how it goes.
I’ve found recently that complex designs aren’t just more difficult to build, but have significant effects on browser performance. To improve the performance of our site, we used CDN (Amazon S3 hosting the files), we removed background images and we tweaked the server configuration no end.
Now, something you find out very soon when you start optimising pages is that your browser can’t make more than 2 requests to a given domain at any time. So, when you hits Amazon.com we get the HTML, then we connect back to amazon.com to get the CSS, images and JavaScript to make the page pretty and clever. These extra bits – collectively called resources – can only be downloaded 2 at a time from a given domain name.
This matters because your beautiful page, with its drop-shadows, fancy JavaScript and massive background image all needs to be downloaded before the user can enjoy just how lovely it is. BUT… if you have 10 images sitting on 1 server your browser can only get 2 at a time. This slows things down.
Part of the answer is a CDN – a content delivery network – whose sole role is to host resources on a different domain from your website. So the images for example.com might be hosted on static.example.com, or even on static1.example.com, static2.example.com and static3.example.com. The more domains, the more connections your browser can make.
You can also read a very good description of implementing a CDN with Rackspace’s Cloud services.
So, that’s method number one. Another method is to reduce the number of resources that have to be downloaded. Instead of downloading 100 images, download 2. Google Web Toolkit does this out of the box, by bundling up individual images for you.
A rails package I just came across does the same thing – check out http://documentcloud.github.com/jammit/ mentioned in Rails Inside.
Recently featured on the AWS Blog, Twilio provides an API to phone calls. When someone calls in, it fires a web service on your server. You can then respond with a message – e.g. “Thanks for calling” – which is spoken back to the caller.
I particularly like this kind of cloud app because it is a bridge to a domain to which web developers tends not to have access at the moment.
Now I just need to contrive a project to use Twilio.
Back from a long summer holiday and lots to do. Having just put singup.org live we seem to have an endless stack of new work as well. (Ok, I didn’t put singup.org live – I was on Holiday.)
On top of planning a new series of articles for Linux Magazine on High performance and cloud computing, I’ll be busy bringing by previous GWT article up to date with the latest version.
Waiting excitedly for Google Wave on Sept 30th.
Recently at an Amazon event at Channel 4 (http://animoto.com/play/ZmrGxAfrxEJq1sydVYonJg), I mentioned the fact that EC2 didn’t compare favourably to many dedicated hosting packages. I was told that things were going to change and the next morning, reserved instances were announced.
Normal EC2 instances work like this: you buy an instance for an hour, you’re changed $0.10/hr.
Reserved instance: you pay $325 now and for the next year you buy an instance for $0.04/hr when you need it.