Peter's Blog

Redefining the Impossible

Items filed under slicehost


A short update on my Slicehost vps which I have had for two months now. I love it. It's fast, reliable and I have no criticisms of it whatsoever. I've cancelled my vpslink vps and I will cancel site5 once the contract runs out. All my eggs in one basket (ok, two if you count the rsync.net backups). Slicehost offer backups but:

  • they cost $15 a month
  • you only get three
  • they are snapshots of your live system and hence will back up the trojans, root kits or whatever your system has succumbed to
  • rsync.net is independent

TODO: learn capistrano.

Peter's Blog: No affiliate links.


Filed under: slicehost vps vpslink

2 Comments

I'm so taken with my new SliceHost VPS that I've moved this blog over to it. For the first time in four years this blog is hosted on something other than Apache: Nginx. It's still on drupal but running under php5 for the first time (only needing this fix).

The DNS has only just propogated so this is my first posting on the new host. To me it feels snappier when navigating around, a definite improvement.

I've been moving all my sites over to the new host, I've decided to put all my eggs in one basket. Well, not quite, I've also signed up for a minimal rsync.net account, giving me just over 3g of backup space. It will cost me circa £2.50 a month but will be worth it for the peace of mind.

I've put all my sites and also my most important /etc directories (such as /etc/nginx) into a subversion repository. I found a great subversion tip for checking /etc into subversion in the subversion faq:

How can I do an in-place 'import' (i.e. add a tree to Subversion such that the original data becomes a working copy directly)?

Suppose, for example, that you wanted to put some of /etc under version control inside your repository:

  1. svn mkdir file:///root/svn-repository/etc \ -m "Make a directory in the repository to correspond to /etc"
  2. cd /etc
  3. svn checkout file:///root/svn-repository/etc .
  4. svn add apache samba alsa X11
  5. svn commit -m "Initial version of my config files"

This takes advantage of a not-immediately-obvious feature of svn checkout: you can check out a directory from the repository directly into an existing directory. Here, we first make a new empty directory in the repository, and then check it out into /etc, transforming /etc into a working copy. Once that is done, you can use normal svn add commands to select files and subtrees to add to the repository.

There is an issue filed for enhancing svn import to be able to convert the imported tree to a working copy automatically; see issue 1328.

So all the juicy stuff is in subversion and then I rsync the subversion repository over to rsync.net for the backup (nb, don't rsync a live svn repository while anyone else is modifying it!). This will allow me to roll-back changes should need be (or more likely see what I've changed to break something) using the Slicehost subversion repositories.

If anything does go wrong with my Slicehost slice (not saying it will but it might), I can rent a new VPS or dedicated server and have my stuff back up and running in less than a day (DNS propgation to the new server would be the delaying factor). It's not perfect redundancy but I'm not shafted.

Probably a more likely scerario is my server gets pwned in which case I would remaster it.

The rsync copy between the Slicehost and rsync runs at 583850.15 bytes/sec. Pretty good.

Possible improvements:

  • Use Duplicity to backup the repositories, with a full+incremental scheme.
  • Put a web front end on the subversion repositories so I can browse them (although [subclipse|http://subclipse.tigris.org/) is working nicely).

UPDATE: I've noticed this article getting hits for people looking how to copy a subversion repository. The simple answer is to just copy the files: cp -rf, rsync -a, however you like copying things. If the repository is live (i.e people are using it) or it will be running on a different version of subversion then the answer is to use:

svnadmin dump path-to-repository > dump.dat
cp dump.dat {wherever}
cd {wherever}
svnadmin load path-to-new-repository < dump.dat

Filed under: rsync slicehost subversion svn

2 Comments

When researching VPS's to host websites a few months ago I came across SliceHost who were very highly regarded but had a long waiting list, with waiting times measured in weeks unless you were willing to commit to a top range deal for a year in advance.

Hence I went with vpslink and a 512Mb VPS. Vpslink are cheap but have the limitation that you get no 'burst' ram so if your 512M runs out then phut, apache crashes. This was happening to me until I changed from the preforking apache to the multithreaded one that uses less memory (fewer processes) after which it was rock solid. However, I no longer trusted it.

Last Saturday I was still mulling over hosting and checked Slicehost again to find that their waiting times were down to less than a week for all their packages. Their prices are slightly better than VPSlink so I applied for one and by tuesday I got an email with a link to sign up. Signing up was easy enough and within minutes I had 1024Mb slice for three months.

My first impression when I logged into it with ssh was that it was very fast. Typing into the console, the keypresses appeared immediately. In a way it's a detail but it shows there is low latency between me and the server (I'm not sure where the server is but I saw something about swbell in the iptables which makes me suspect it is in sw USA). Everything I did with it (installing packages etc) happened very quickly.

But the thing that impressed me most was... the documentation on their site. Very good indeed, great guides on setting up servers for Apache, Rails, Mongrel, iptables etc. Simple step-by-step instructions to go from a raw OS install (ubuntu gutsy for me) to a running site. Other hosting services I have used have had scrappy and out-of-date documents (oneandone) or I had to spend ages trawling forums for answers (site5: and with a shared hosting service like site5 setting anything up is intrinsically more difficult because of the shared hosting shackles). Slicehost appears to be a 'run-by-developers-for-developers' deal and feels very web 2 and geeky. Perfect.

Armed with the documentation my site is running under apache with a mongrel cluster serving up my rails app! And it is running very nicely, very snappy. The mongrel cluster is using 10% of my memory under zero load (I wouldn't dare do this on vpslink) and setting it up is not the most straightforward thing and I couldn't do it again without the slicehost docs. I would ditch apache and use pure mongrel but:

  • apache makes virtual sites very easy
  • if I ever wanted to move one of my drupal sites to this server I would need php and apache's url rewriting facilities (to get the clean urls working: the 'new wave' servers like lighttpd are great for serving static files but have too many shortcomings for anything beyond that).
  • I want multiple rails apps and I'm unsure whether mongrel can do that (I've been bitten by cherrypy and it's one-site-under-mod-python ethos so don't trust anything else yet).

So far Slicehost is looking very promising. And no, there are no referral links here. Vpslink are good but their slightly more expensive spry brand VPS's may be better for reliability. There aren't any other vps providers that I would consider. They are either the pile-high-sell-cheap types (oneandone) or poor/terse support (linode).

Petersblog is still on site5/drupal. Maybe, just maybe, I can make it my christmas holiday project to port it to rails. Maybe.


Filed under: rails slicehost

4 Comments