A new server and new things

It's no understatement to say that this website has fallen largely into disuse over the years. I aim to fix this; and to start it's high time we got our server infrastructure sorted out.

We're now serving all our content from a Rackspace virtual host, which means we have complete control over what it can and can't do. We no longer need to make halfassed compromises with server constraints and serve annoyingly awkward websites with no reliable database backend. Hooray!

As of a few weeks ago, spadgos.com is running its own machine with a pretty much standard configuration. Some notes on the specifics of this for those who might have an interest:

  • Webserver stack:
    • We commonly use PHP and a little Ruby at spadgos, so we have favoured a LAMP stack for some time. All the basics as you'd (Apache & PHP), but we swap out MySQL for the excellent Percona Server. These run most sites, with Ruby on top for a few random things. Ruby is pretty easy to integrate via Passenger (though not particularly fast). However, we also do some node.js, so this is where it's going to get complicated.
      Eventually we will have to move to a proxy setup in front of Apache and various node servers. Squid has always been the go-to, but I'd really like to give HAProxy a try. Or of course, we could just setup a RackSpace load balancer (though I feel this is potentially more expensive than a tiny HAProxy box, but who knows?). When you need this many services running, that kind of setup is really the only way to go - running node via cgi in Apache will not handle anything serious, since this means invoking a whole Apache thread for each connection and thus defeating the whole point of running something like node. You can, in a pinch, run Apache through node, but this is generally thought of as a flaky way to go and should require a separate daemon to monitor its health in my opinion.
  • Monitoring:
    • I have used nagios in the past for watching the server's health, but decided to drop it due to its weight. For what it's worth, you can configure the free version to monitor a range of servers and define services on those servers to check. You can even configure custom web services and monitor their health, raise their priority and so on. There are also some prebuilt Percona monitoring scripts you can get from their website.
      Monit is what I'm using now - a much simpler utility that runs via command line but can shutoff runaway processes and automatically reboot them.. handy! For some other monitoring things (logfile watching and so on), I use the excellent chip.
    • Although there are some awesome nagios plugins out there for monitoring disk usage, if you want a nice way of reading what exactly is on the filesystem then I recommend also installing philesight. This gives a nice pie-like nagivation through the filesystem with larger directories occupying more space at each depth. Great stuff.
    • 'Real' web stats I am given via Webalizer, since analyitcs will only track pageviews with those tracking assets embedded on them.
  • Email:
    • We delegate all our mail handling to google apps, so we don't need any mail handling on the server at all- we just forward everything at the DNS level. Our outbound mail goes out through our own internal SMTP, which works fine for most things. One issue I had with this was due to Rackspace's DNS admin UI - it requires JavaScript and is coded to disallow underscores for TXT record names, which made it impossible to setup domain key signing with gmail (note: they were quick to fix this issue in their UI after I complained about it). Fortunately, Rackspace support was happy to assist and I simply added the record under another name and had them hand-edit it in the backend for me.

In any case, hooray for sockets, hooray for process forking, hooray for ssh access and hooray for database uptime. More good things to come here soon!