My Foray into the Cloud
For several years now, I have been operating the mail server and primary name server for my personal domain at my home. I run secondary name servers for some friends’ domains as well, and also the data collection for our photovoltaic system. All of this necessitates running my Linux machine 24/7, consuming 57 watts or about 500 kWh/year.
I have frequently wondered if there isn’t a better way to do this without giving up the control I have over my set up. Particularly when I’m on vacation, I get a bit concerned that the server or networking hardware might fail, there might be an extended power failure, or the DSL line serving my home might fail in some way. Not long ago, I did have a router failure right after returning from vacation, apparently brought on by the high temperatures in the attic (I have since moved the router). Another consideration is that I currently need a static IP address for my Linux server; that’s fine for now but it limits my options if I want to change Internet Service Providers. Some of the faster alternatives charge a substantial amount for a static IP.
I started out thinking I wanted a cheap provider of colocation (colo) services. These services cost more than I expected, but they are really more capacity than I need. I soon found out that what I wanted is termed a Virtual Private Server (VPS), a virtual Linux machine to which I would still have root access, running on shared hardware hosted in a data center somewhere.
There are lots of VPS providers available, with similar pricing and offerings. I have been dabbling with IPv6, and decided to vote with my feet in favor of a VPS provider that has native IPv6 connectivity. This also would mean that my DNS and mail server would have good IPv6 connectivity as well. A quick search revealed a blog entry about someone else who had done the same thing.
Somewhat coincidentally, I attended a Meetup featuring about a talk about back-end services for iPhone applications. In the talk, Ramin emphasized how easy and inexpensive it is to set up a VPS. Thus encouraged, I gave it a try. I chose RapidXen, one of the IPv6-enabled VPS providers that has points of presence close to me.
The sign-up process was pretty easy: I chose a modest-sized VPS, which costs about $10/month. The memory allocation seemed small, but it’s important to remember that (1) without any graphics going on, the memory footprint will be smaller, and (2) it’s easy to ask for more if you don’t have enough. I signed up on a Friday evening and thought things were all automated, but found that initial provisioning of new accounts is manual, to avoid fraudulent accounts. This is quite reasonable in today’s climate, and I was up and running in about 24 hours.
I had a couple of things to adjust to. On my home Linux machine I use a mix of command-line and graphical tools for administration; on the VPS everything is command-line. The bigger adjustment was that the VPS uses Debian linux, while I use Fedora at home. A few commands are different (e.g., rpm vs. apt-get), and some of the configuration files are in different places, but there were no major problems.
One of the warnings in Ramin’s talk at the Meetup was that one should get a firewall in place very quickly. He said that he had detected port-scanning attempts within minutes of provisioning a new VPS, so it’s a very good idea to get familiar with firewalls such as iptables in advance. This was a new experience for me, as I’m accustomed to setting these up on my routers, but turned out to be quite straightforward.
I was initially a little surprised that IPv6 wasn’t provisioned by default on my VPS, but this is perhaps a good idea so as not to create a security hole for those who aren’t prepared to configure ip6tables as well as iptables. I opened a trouble ticket, and was given the IPv6 network address I was to use. This needed to be manually configured on my server (not through DHCPv6) in /etc/network/interfaces. Having done this and restarted the network on the server, IPv6 was immediately available.
The only negative so far in the week I have had the VPS is that there have been a couple of hours of downtime. This is apparently because RapidXen had upgraded to Xen 3.4 (from 3.2) and it proved to be unstable. I don’t know if this is typical or not; over a longer period I would expect much less downtime. I’ll therefore move cautiously and start with non-critical services (like DNS secondary) and see how that works. The hard service to move is going to be the monitoring of my photovoltaic system. I’m thinking about trying one of those plug computers to upload the measurements into the cloud, and will post something if I do that.
As I was mentioning to a friend the other day, a VPS like this is a great and very inexpensive way to learn Linux system administration, languages, databases, and so forth. If this doesn’t pan out, $10 times a few months is less than many of the books one might otherwise invest in.