MarkLast Login: 04/10/2006 1:26 PM
Link:
Comments: 0 Creating a website, part 2. (Hosting)
Anyways, a quick story-- back in 1997, Atlantic Records wanted to upgrade their site to a more dynamic site. At the time, the site was just a bunch of static pages, and they wanted to be able to add content to the site without knowing html. Okay, no problem. We picked up a dual-CPU Pentium 1 (100Mhz per CPU) and ran Windows NT 4.0 on it. Now, mind you, dual CPU support in Windows in 2004 is still rather shady, so you can imagine what it was like in 1997. I was the fortunate one to get the pager of when the site went down -- which was: Every. Single. Night. Mostly around 3am. I ran on about 5 hours of sleep for an entire summer while I was rebooting the machine. We finally broke down and put it onto one single CPU, where it limped along until the Pentium 2 came along.
Want to keep yourself from waking up every night to call technical support and get them to reboot the machine? Want to save yourself from a ton of stress? Read on. Here's what you want to keep in mind when selecting a hosting platform.
- Unix vs. Windows.
The old religious war starts up again. In all fairness, I've had good experiences with Windows, and bad experiences with Unix -- but those stories are few and far between. Unless you are a die-hard .NET coder (all two of you) I can't think of any good reason to select Windows as your hosting platform. Windows has a long, long history of poor reliability. I have not yet seen a Windows box that handles a decent amount of traffic be able to stay online for more than 6 months without needing a reboot or some other significant unplanned downtime. While Windows has certainly gotten better over the past three years, I just can't see any compelling reasons to go with it over a Unix-based platform. The only thing you can do under Windows that you can't also do on Unix is VB code in ASP-- and why would you possibly want to write in Basic?
I'm a recent convert to Red Hat Linux, having been a FreeBSD bigot for nearly 5 years now. Before FreeBSD, I wouldn't touch anything but a Solaris box. I know Red Hat has really gone and screwed the Linux community over by dropping their support for RH9 (which I'm running) but it has been an extremely stable platform to build web applications on. Why did I switch from FreeBSD to Linux? Java support. FreeBSD, up until very recently, only natively supported Java 1.1 (and to some extent 1.2). Now they're just getting 1.3 up and running. Meanwhile, the Java community will be seeing 1.5 later this year. To you non-Java folks, these minor version numbers may not mean much, but trust me-- between 1.2 and 1.4 is a world of difference. All of my applications require the 1.4 JDK these days. If you aren't going to use Java to build your application (say if you're a PHP fanatic) then I would definitely look at FreeBSD over Linux. FreeBSD is just a rock solid platform, and the community isn't as fragmented as the Linux community.
If you're really daring, consider OS X. Yes, as a hosting platform. OS X combines the rock-solid stability of FreeBSD, with a 1.4 JDK, and Apple's user interface and ease of use. If you hate the command line but want to run a Unix platform, OS X may be the one for you. The XServe is Apple's first big push into a serious enterprise-level hosting platform, and I will testify that it is an amazing little box. It'll set you back some bucks, but hosting is the one area where you don't want to skimp on the pennies.
Okay, so you've picked out your platform. Where next? Your bandwidth. If you're doing this on the cheap, go for a shared provider, one of the bigger houses -- Rackspace, Serverbeach, you know the ones. But if you're creating an application where you may need physical access to the machines, you're going to have to go with a local provider. I'll leave that research up to you, but I would recommend that you take a tour of your provider's space before signing any contracts. The last thing you want to see is a provider that is nothing more than a couple of guys and a closet full of wires and blinking lights. Look for a professional setup, and look for a well-documented organization. If you have to jump through a few hoops in order to get physical access to your box, that's a good thing.
Plan on more bandwidth than what you will need. Any decent provider will bill you on the 95th percentile, which is to say that your bill reflects a rate that you stay below 95 percent of the time over the course of a month. This means that for 36 cumulative hours, you can spike over your allotted bandwidth (say 1Mbps) and still be charged your normal amount. Don't get swindled by a provider that says "you have 300GB allotted to you per month" because those sorts of plans will almost always screw you if you wind up going over that amount. Ask your provider for a bandwidth rate, not a total number of bits allowed.
What else do you need? Root access. If you're supplying your own boxes to a colocation facility, this isn't an issue, but if you're starting out small, ask for either a virtual server with root access, or your own dedicated box with root access. Superuser access is the only way you can be assured that you have complete control over what happens on your machine, and in many cases it's the only way to enforce any sort of security at all. You'll be able to install a custom version of Apache (but that's left to another entry) and a good application server, amongst any other software you need. Without root access, the best you can do is upload some html files to a webserver somewhere and cross your fingers that your pages will work. Dynamic sites are a pain in the ass to completely configure without root access at some point in the process.
Okay, last thing, really quickly. Reliability. If you're on a smaller budget, one machine will probably be okay for you, but if you're looking for either a lot of traffic, or a lot of uptime, you should look into running at least two machines and a load balancer. You can find the BigIP on EBay for around $2000 these days, which is an absolute steal considering what that machine will do for you. Hardware is so unbelievably cheap these days that only the most high-end web applications (think extremely processor hungry application servers, like Weblogic, Oracle iAS, etc) will need a machine that costs more than $2k. Even high-end RAID5 storage is so inexpensive that a huge-traffic site could be architected for less than $25k.
Next up: supporting services (Mail, DNS, etc) to run your site.
