On the Cloud

Unless you’re a geek from another planet, you’ve been hearing the buzz about cloud computing for the past year. Amazon has been one of the major thought leaders in this space with their EC2. Combined with their other web services, Amazon provides about the most complete cloud implementation. There is only one problem…. price.

A small EC2 instance would run about $73 a month. Yes, you can go cheaper if you turn it off, but how many people actively turn off their websites? It can get cheaper if you reserve capacity, but the $325 up front cost is a bit too steep for me.

I’ve been looking at cloud solutions for a development playground for a while. After taking a look around, I quickly discovered that quality hosting of Java applications is pretty difficult to find, especially given my requirements. I want a host that is running Java 6, Tomcat 6, MySQL 5 and allows me to do what I want with the instance. Shared hosting is obviously not the solution, so I looked at “Virtural Private Servers (VPS)” as an option.

Even VPS has been a pricey option. GoDaddy wants around $45/month for a virtual Linux server with 512MB of RAM. I tried one for a bit, but it wasn’t cost effective for a playground environment. I had about given up hope until I stumbled upon Mosso.

Mosso is Rackspace’s new entry into the cloud computing space. They are trying to get a foothold against Amazon in a pretty simple way, trash them on price. For an equivalent size cloud server, Mosso costs about the same as Amazon. But unlike Amazon, Mosso scales down to smaller instances. For about $22/month, you can get a Linux cloud server with 512MB of RAM that you can do what you want with.

I signed up for one of Mosso’s cloud server accounts last week to use for Java. 512MB of RAM is plenty for what i want to do. You can pick what Linux distro and version you want to use, and I was pleasantly surprised to see they had the latest and greatest (Ubuntu 8.10/Fedora Core 10). They are obviously targeting this at alpha-geeks.

One big difference with Amazon is that Mosso does not offer Windows. They provide you with a very naked (read secure) base Linux install to start with. You have to be competent with Linux (ssh, bash, shell commands) to even have a chance with Mosso. I’m pretty comfortable with Linux, but there are still some things I had to consult some friends on. In the end, I setup exactly what I wanted: Ubuntu 8.10, JDK 1.6.0_13, Tomcat 6.0.18 and MySQL 5. I’m using the instance to run some Java sample applications I’m working on and will use it as the backend for a Facebook application I’m going to play with.

The only downside I’ve found with Mosso is that it is pretty immature compared to Amazon, especially in the area of documentation. You can see the Rackspace guys are working on it, but there are still a lot of holes. I was pretty frustrated setting up iptables for a firewall because the documentation says “look at this sample” but there was no sample attached. Fortunately, Google and a friend saved me. The documentation for setting up email has the same holes.

Once I got past the documentation issues, Mosso has proven to be a winner. This is going to put a lot of pricing pressure on Amazon and the others in this space. You’d have to be an idiot to pay GoDaddy twice as much for the same thing. I’m willing to bet you’ll see about everyone hit $20/month for a usable cloud server before too long. Amazon will definitely have to drop their price.

On a side note, here is a good sample of an iptables rules file you can use with Ubuntu on a Mosso cloud server. Just be sure to change 10001 to whatever port you want to use for SSH:

*filter

# Allow loopback adapter
-A INPUT -i lo -p all -j ACCEPT
-A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT

#  Accepts all established inbound connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

#  Allows all outbound traffic
-A OUTPUT -j ACCEPT

# Allow SSH (very important - set to right port)
-A INPUT -p tcp -m tcp --dport 10001 -j ACCEPT 

# Allow 80 and 443 (web traffic)
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT 

# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT

# Reject all other inbound - default deny unless explicitly allowed policy
-A INPUT -p all -j DROP
-A FORWARD -p all -j DROP

COMMIT

4 thoughts on “On the Cloud”

  1. Tim —

    Thanks for the write-up! I’m glad you’ve been able to get up and going on Mosso. You’re right about our documentation: it’s early for us. I was just talking to one of the guys today about the articles we’re adding and improving. Please trust that documentation will be a big area of focus for us. I personally believe Rackspace has a mission to expand Fanatical Support into other areas, including “Fanatical Documentation”. At any rate, I’m eager to hear more comments from you along the way. Hit up our online chat if there’s more we can do for you. They’ve been a huge help to folks as we work to expand the online docs.

  2. Cool, Todd. You all are on the right path. You just need a bit more polish. I’ll patiently await the documentation updates. I would really like to setup an email server, but won’t chance it to random research given the pain a poorly secured or configured SMTP server can cause.

  3. So what else did you have issues with besides iptables and email? I’m debating on setting something up for JavaMUG and the Rackspace service might be what I’m looking for.

    Erik

  4. That was pretty much it. The Ubuntu distro has aptitude, so the MySQL install as simple. I SCP’d my own copy of the JDK, mysql-connector-jdbc and Tomcat. Just need to remember to install ia32-lib before trying to install a 32-bit JVM or it will fail. The default Ubuntu is 64-bit for scaling up, but there was no good reason to install the 64-bit JVM on a 512MB system. You’re a bigger Linux geek than me, so you should have no problem.

Leave a Reply

Your email address will not be published. Required fields are marked *


*