--- title: Hosting options date: "2013-06-01T05:48:55Z" categories: - how-i-do-things wp_id: 2847 description: I compared hosting costs across GAE, Azure, and AWS. I chose Amazon EC2 spot instances in Singapore, using shell scripts for fast recovery to cut my monthly hosting bill from $230 to just $29. keywords: [amazon ec2, spot instances, hosting costs, cloud infrastructure, latency, shell scripting] ---

I've been trying out a number of options for hosting recently, and have settled on Amazon spot instances.

Here were my options:

I’m a price optimisation freak. So I ran the numbers for a year’s worth of usage. I was looking at the CPU cost of a large machine with 7-8GB RAM. Bandwidth and storage are negligible. The cost per hour worked out to:

The price is not all that different, but I need low latency, so Singapore it what it’ll have to be.

EC2 location Latency (ms)
Singapore 139
Oregon, US 334
Japan 517
Ireland 618
Australia 620
California, US 677
Virginia, US 710

Now comes the choice of the right model. At $0.32 per hour, that’s $230 a month.

Amazon offers some ways of getting this down. Instead of on-demand instances, I could go for reserved instances. For a year of usage, that’d get the price down to about $131 a month, nearly halving it. ($739 upfront for a heavy utilisation large reserved instance, with $0.095 * 24 * 365.25 for the year.)

In this case, I know I’ll need the servers for a year. Probably more, but then, I might want to switch later. So this isn’t a bad move. But we can do better. Amazon also offers spot instances. Spot instances might get shut down any time – but in reality, so can on-demand instances. I need to plan for it anyway. I’m not going to host anything that’s so sensitive that if it’s down for a few hours, I’ll have a problem.

But what’s attractive is the pricing. Typically, it’s $0.04 per hour, making it about $29 per month. Even if it shoots up to twice that, at $58, it’s less than a fourth of the on-demand price and less than half the reserved instance price.

I’ve managed to script the entire setup up sequence as shell scripts, and it takes less than an hour to get a new server up and running the software I need. I need to work out a decent backup mechanism. Plus, I could use more reliable storage like like Amazon’s EBS to preserve the data. But on the whole, the pricing is far too attractive and makes the risks worthwhile.

--- ## Comments - **[Anand Chitipothu](http://anandology.com/)** _2 Jun 2013 3:36 pm_: Did you look at Linode? I've been using Linode for couple of years and pretty happy with it. The 8GB RAM model costs about $160 per month. Sadly, they don't have a data center in Singapore. You can test the download speeds and latency of their data centers from https://www.linode.com/speedtest/. - **[jouko](http://www.bestdoorlocksets.com)** _7 Jul 2013 4:21 pm_: I am using Inmotion hosting for my blog. May be i should also shift to amazon cloud. - **[S Anand](http://www.s-anand.net/)** _3 Jun 2013 7:30 am_: I did try Linode early on, and it's a fairly decent option. It's just that for my needs, the $29/month that I can get with Amazon is too attractive. - **Amit Chakradeo** _3 Jun 2013 8:33 pm_: If you don't mind occasional downtimes and occasional ummm complete loss of data :-), you can consider low end VPS boxes. (http://lowendbox.com/) You can find some decent deals if you check out the posts there... - **Sriram** _15 Jan 2014 4:18 pm_: have u tried openshift ?