View Single Post
Old 11-18-2009, 11:36 AM   #7 (permalink)
Martian
Young Crumudgeon
 
Martian's Avatar
 
Location: Canada
Yeah, I'm not even sure where to start.

This is not something that will be likely to save you money. Anything other than a completely trivial amount of traffic will quickly saturate a residential cable/DSL connection. The major problem here is upload capacity, which isn't likely to be higher than 1mbps. You won't be able to server requests to more than a handful of users simultaneously -- any more than 6-8 people connected at once and it'll start slowing down and timing out.

There's also the power consumption -- on a commercial-grade rack server, this is non-trivial. Of course, you can simply use a consumer-grade box for this and it'll work (see also: Google), but I'm not sure what kind of hardware you're looking at on ebay so I want to cover the options.

Putting aside the why's and wherefore's, as requested, the actual mechanics of it are pretty straightforward. Set up a box, connect it to your network. Install Linux -- Ubuntu is as good a place as any to start, although you'll probably want to move to Slackware or something similar eventually. You'll do most of your configuration and maintenance via SSH, so you won't need a separate desk/keyboard/mouse/monitor for it.

Once you've got Linux up and running, install Apache and you're good.

The biggest problem is going to be the networking/routing. Ideally what you should be doing is getting a small subnet so that you have more than one IP available to you. That way you can avoid NAT in front of your server, and segregate the server from your home network. You can simply set up port forwarding on any residential router, but that's a bit of a hack. The ideal here would be a Cisco or similar router, plus an extra IP or two and probaly an hour or so configuring it (assuming you know what you're doing).

To Fugly, different hosts have different costs for a variety of reasons. For one, level of support varies. Some hosts allow or disallow scripting, some hosts offer different levels of tech support, some hosts will even take care of registration for you. On top of that is something that is pervasive on the business side of computers and networking, which is the service level agreement. Under an SLA, a host or service provider is contractually obligated to provide a predetermined level of reliability. Consider that even at 99% uptime, a server may be down for over 80 hours over the course of a year -- if that server represents your income, it's a big deal. The biggest providers offer 'five nines' SLA's (99.999% uptime), which requires a huge effort. Massive amounts of redundancy, multiple connections, multiple backups and the manpower as well. Those kinds of hosts cost a lot to use because the service costs a lot to offer.

So the short version is, you get what you pay for. If your website is about your dog Rex, having that kind of reliability might not be important. If it's how you support yourself and your family, then it becomes a different matter.

EDIT - You don't need separate hosting if you want a custom homepage. If you're really looking for that, you can just create the file on your desktop/laptop/whatever, and point your browser to it locally.

There really is no practical reason to have your own webserver. It's cost effective for very large operations who would pay thousands or millions per year to third party hosts, but I doubt anyone on this site (or even the site itself) has sufficient traffic to make that the case.

Also, that's not exactly how DNS works either. There is no one host (including the root name servers) that keeps track of every domain name in existence. If there were, simple updates would become a nightmare.

The whole thing is broken up into zones of authority, generally referred to simply as zones. A domain name actually reads right to left in terms of zone, which is why the (usually three letter) bit at the end is known as the top level domain or TLD. There are currently 13 root nameservers, which serve as pretty much the hub of the DNS system (and by extension, the internet as most people know it).

On every computer is a tool called a resolver. Whether you're running Mac, Linux, Windows or PalmOS on your cell phone, if it connects to the internet you have one. When you type a domain name into your browser, it gets handed off to the resolver, which goes to work. The resolver is essentially a pared down DNS server that's only able to make specific types of requests. It makes a non-recursive query to the name server specified when the network connection was established (usually via DHCP), which will then begin what's called a recursive query.

A non-recursive query is one that say 'I need an IP for this address, and I don't want anything else.' A recursive query says 'I need an IP for this address, but if you don't have one please tell me who might.'

The resolver will start at a root name server, with the TLD. When a domain name is registered, one of the things that occurs is that the IP address is added to the look-up table (known as a zone file) for the relevant TLD; thus, tfproject.org is registered with the .org root server. The root server will point the client towards the closest approximation. Sometimes it's the server in question, but often not. In this case, because my request was for www.tfproject.org, the root name server will point me (or my DNS server, more specifically) to the name server that's authoritative for the tfproject.org zone. That server, in turn, should know the address for the server responsible for www.tfproject.org. If there were a further subdomain (say, www.boobies.tfproject.org) then there could be further levels of recursion.

DNS is enormously complex, and an issue all it's own, which is why I didn't initially touch it. If you want to run your own name server, you're going to be getting into a completely different can of worms.
__________________
I wake up in the morning more tired than before I slept
I get through cryin' and I'm sadder than before I wept
I get through thinkin' now, and the thoughts have left my head
I get through speakin' and I can't remember, not a word that I said

- Ben Harper, Show Me A Little Shame

Last edited by Martian; 11-18-2009 at 11:55 AM..
Martian is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360