A disclaimer to human beings
If you read my last post, then you’re in a fairly good position to follow this one. However, that post was by no means a comprehensive coverage of everything I’m about to blast through a paragraph from now. The “for nerds” installments in this series will be very much a sink-or-swim affair, and I won’t be stopping to thoroughly explain concepts the way I do in the “for humans” installments. At best, you’ll see a link to a location you can read more about something, and even then, this is only likely to happen if the technology or concept I’m explaining is somewhat obscure. If a little challenge never daunted you though, and you wanna give this post a run anyways, I applaud you. Remember who your best friend is if you ever find yourself scratching your head.
Ready to roll with the nerds? Yeah, you’re ready to roll with the nerds. So as some moronic Italian plumber once said, “Here we go!”
This blog is something which has been kicking around my head since right around the beginning of the year. Wanting to launch some sort of personal web space for myself has been a goal since well before that. There have been a few barriers which conspired to keep this from happening, the most prominent of which was simply expectations for myself. I wanted the website to be entirely mine. I wanted to build the code from scratch, build the environment from scratch, and host the damn thing myself on my own home internet connection. This was a perfectly valid idea in my overzealous mind. I know how to write HTML, I know how to write CSS, and although my PHP is garbage, my Python is pretty tight, so I have a very good dynamic web programming language under my belt. Besides, for some (not so?) coincidental reason, most of today’s coolest web frameworks/applications/technologies are all either written in Python or Ruby… so I’m not saying those are better languages than PHP (personally, I find Ruby to be quite repulsive), but the people who wield them certainly seem to be of a different caliber. Feel free to flame me for that one in the comments ;)
Before I piss off anymore nerds from the school of traditional web programming, I’ll get back on topic. The point is, I looked at my skill set and said Hey, I can do this. This was a rookie mistake. Not because I was incapable of achieving what I wanted to achieve, but because what I was after was going to take a f**k load of time, which I was entirely unwilling to dedicate.
Over time, as I put off the creation of my web space more and more, and instead sunk my time into building other, more interesting things, I doled out to other things all of the resources which I had planned on dedicating to the project. Three VPSs had their purposes filled as fast as I could spin them up. One minecraft server, one primary mail & DNS server, one backup MX & DNS server also serving as an HTTP and git repository. Of course with all that stuff sitting up there on VPSs, and my VPS provider (who will get a shout out in a future installment) wanting to charge me to back all of it up, I needed to find my own no-extra-cost backup solution. Which I of course found, but needed to use up one of my two home servers in order to implement. When my second server took a nosedive soon after dedicating my first one to backups, I was left without a sensible place to put my site. Although I had certainly not accepted it yet, it was at this point I effectively entered the market for a web host.
In case you haven’t picked up on it by now, I’m a pretty dedicated do-it-yourselfer. This makes me always reluctant to accept it when I need to resort to paying to use someone else’s server space. This is compounded by the fact that no shared hosting plan with any major provider is going to give me SSH access to my environment. Since I use git and rsync to move virtually all of my data around between locations these days, that’s a major point of contention. In the few cases that SSH access is provided, it’s almost always bastardized. Being able to
cd is cool and all, but I need some real tools at my disposal.
In addition to the issue of being given baby toys where tools should be with most shared hosting packages, there’s the issue of price and commitment. There’s no way in hell I’m going to commit to 3+ months of glorified FTP service or put my site on a server that will take 10 seconds to load a splash page. In fact, if it’s going to cost more than (or even almost) $5/month, I would sooner spin up another VPS for the same price and have full management power over the environment. Quite frankly though, with 3 VPSs already putting a drain on me, I just wasn’t prepared to pursue another one until there was more need than just a place to put a simple website.
It hit me like a ton of bricks
It was by accident that I stumbled upon my current host, NearlyFreeSpeech.net. It all started when I randomly encountered some psychotic free speech advocate sitting outside of a coffee shop, going over the details of some pro bono case he was contributing to. This case happened to involve a site hosted at this web host, who I remembered reading of some time ago. What had caught my attention this time around though was that they are also a domain name registrar, and I was becoming less happy with my former registrar (who I won’t link here, because I don’t want to give them the page rank) every day. In the process of researching them for my domain transfer, I (re)discovered that they offer some pretty kickass hosting, and a way of doing business that I can really jive with.
Show me the money
One of the things that very much sets these people apart is that the model is almost exclusively “pay per use”, and very little more. Your classic dynamic web stack (Apache, MySQL, PHP/CGI) will run you a base cost of $0.03/day. Yes, you read that correctly. Three pennies per day. It’s $0.01/day for the CGI environment and another $0.02/day for a MySQL instance. Which means if you can find a way to cut MySQL out of the running of your dynamic site (which you’re a nerd, so I know you can hack a strategy or two), that already stupidly low base cost gets cut by 66%.
Now if you’ve ever shopped around for web hosting before, I know you’re reading this, and some part of you knows better. At this point, you’re thinking, “Um, 90 cents a month for my entire hosting package sounds like a scam, so what’s the catch?” Well of course you won’t pay 90 cents a month. That would be out of this world, and more importantly, unsustainable from a business standpoint. Like I mentioned earlier, their hosting is on a “pay per use” basis, so 90 cents per month is just your base cost for a site running in a full FAMP stack environment. You caught that right, observant nerd. It’s not a typo. This is not a LAMP stack. We’ll come back to that though.
Although you pay for what you use in disk space and bandwidth, the costs are really quite reasonable. We’re talking $0.01 per 10 MB of bandwidth and $0.01 per 5MB of disk space used. For the lazy nerds without a calculator handy, that means $2.90 will get you one month’s worth of service for a full dynamic website that uses 1GB of bandwidth and 500MB of disk space. Now I don’t know about you, nerd, but that’s more than enough for my simple blog (actually, my blog will use substantially less than that… but we’ll talk about that in a later installment). As I alluded to earlier, if you find a way to cut MySQL out of your stack, this same usage rate will drop to costing you $2.30 for one month.
As if we weren’t already talking reasonable enough, this host even has an alternate billing structure available which they call “Stochastic” billing. In this model, disk space costs $0.01/10 MB, and a new cost factor known as the “Resource Accounting Unit” is introduced. You can check out the provided link if you want the gory details, but the basic idea behind the RAU is they bill you for CPU/memory usage in exchange for charging less for disk space. They note that this means most people will see no change in their net costs, but being the clever nerd you are, you’ve probably already figured out that this means if your site is light on CPU usage, then this is a great plan for you.
Now here’s where things get slightly more interesting. If you run a static site on NFSN, (Which means no CGI, not necessarily no scripting— more on that in a bit) then you don’t have a base cost, and you are billed exclusively on your space and bandwidth usage (and system resource usage if you go Sotchastic, which if you’re running a static site, why wouldn’t you?). This is actually the type of site I chose to setup, and this means for me that $2.00/month will get me up to 1GB of disk space and 1GB of bandwidth for a static site. Are you going to use 1GB of space for a static site? I know I sure as hell won’t. Naturally some of those savings will sink into my RAU costs, but at my current usage rate, that will end up being < 10 cents for the month. I’m not really in danger of using anywhere near 1GB of transfer either. Last I checked I was at 7MB for the month. Moral of the story? With my current traffic levels, I can expect to pay less than $2 this month for this hosting package.
A hacker’s heaven
Earlier, I made allusion to the fact that the servers at NFSN are running FreeBSD. Now I’m a pretty hardcore linux user (in both desktop and server land), but when it comes to doing certain things (such as building web servers), BSD just has some clear advantages.
Firstly, where windows and linux have become the darling operating systems of the enterprise service world (catch the notable name that didn’t make that list?), BSD has very much remained an operating system of the computer science world. This means that BSD admins, and companies that build the backbone of their IT infrastructure on BSD tend to be disposed to a very computer science-y way of thinking. This does mean that things function on a very mechanical, “there are no exceptions” basis (You won’t get your way by throwing fits and demanding to speak to managers, the way you can with other companies), and there isn’t very much “flash” added to anything they provide (the control panel is about as stylistically plain as they come). However, it also means that things are highly functional (the control panel ain’t pretty, but it’s easy as hell to use, and is well organized), there are no hidden agendas/costs/general shadiness, and they put their focus in to doing only a few things, but doing those few things well. Overall, they’re a pleasure to deal with for anyone, not just nerds.
That isn’t really the crux of my argument for BSD being a better web hosting platform than Linux though (as for Windows… well, you’re a nerd. I don’t need to explain why I won’t waste anymore mention of it). One of the most important features of BSD, from my standpoint as a customer, is jails. Jails can allow a hosting company to feel more comfortable handing me the keys to the car, so to speak, which in this analogy translates to unbridled shell accees. Although Linux servers can provide jailed SSH in a chrooted environment, long-running debates questioning the security value of chroots have lead the vast majority of Linux-providing web hosts to air on the side of caution, declining to offer shell access on shared servers.
Having SSH access is awesome, and most shared hosting providers will not give it to you for the aforementioned reasons, however it’s still not unique to NFSN. That bing the case, this feature on its own is not good enough to really put them over the top. Yet, I still insist that I’ve found the best damn shared hosting provider the internet has to offer. So what is so damn cool about these guys then? That is an excellent question, my nerd friend, and one to which you have been quite patiently awaiting an answer. So let me just get right to it and tell you: it’s all about the toolbox. I’m just going to list off some of the tools that your shell environment comes pre-loaded with.
- Your choice of shell
- cron (managed from the control panel)
- PHP 5.4
- Perl 5.12
- Python 2.7
- Ruby 1.8
- Git 1.8
- Subversion 1.8
- Mercurial 2.6
- BSD Make & GNU Make
- gcc 4.2
All that in addition to all of the standard command line tools you’ve come to expect and love in any shell environment (wget, cat. grep, tar, etc). By the way, did you catch that last one? Yeah, that’s not a joke. You get a no-strings-attached C/C++ compiler in your shared hosting environment. This means that any tools you are missing that are capable of building under BSD, you can fetch and compile yourself. For me, that means being able to build my backup utility of choice and retain my own backup copies of my site.
Since you’re a nerd and all, I know you aren’t going to be impressed by a list of stuff just cause it’s long and sexy looking. In fact, you’re probably shaking your head right now as you think, “This guy is a total oaf. What am I supposed to do with all of that scripting power in an environment with no CGI?” Surely, nerd, you have more creativity than that. Maybe you can’t use it toward running a dynamic website, but you could use it to perform maintenance tasks (a backup script? Log analyzing/reporting?), or perhaps even to… setup a system for a compiling static site from templates? We’ll probably talk more about that in a later installment, so chew on that thought for now.
Are you not entertained?
Still not impressed, nerd? Then I challenge you to find a web host that provides an equally competitive offering of powerful tools and low prices. Not even better, just find something competitive, and if you leave it in the comments, I will gladly eat my words. The power of the NFSN shared hosting environment will continue to shine in the next part of the series, where I get to start showing off my awesome blogging platform, and how I was able to configure it to create the perfect work flow. So if you still need a little convincing, make sure to come give that post a gander.