Goodbye, Dynamic DNS
IP addresses are a lot like telephone numbers for computers. You need one to interact with the Internet. Unfortunately, there aren’t enough IP addresses to go around. I don’t understand the motivations of the Internet’s Founding Parents well enough to say whether this resulted from a desire for economy or merely a failure to anticipate the eventual hugeness of our interconnecting network of networks. But it has unquestionably resulted in some expensive and confusing compromises.
The most common of these compromises has been something called Dynamic Host Configuration Protocol (DHCP). When you deposit a dollar into a bank account, the bank turns around a lends out a portion of that dollar. They can do that because they only need to keep enough cash on hand to cover the worst case withdrawl scenario.
DHCP is essentially the same thing, but with IP addresses instead of dollars. Your Internet service provider buys enough IP addresses to cover what they anticipate to be the worst case Internet usage scenario, and deals out an IP address to you as needed.
They will take this back if you stop using the Internet for a while and give your IP Address to someone else. Sometimes they will even do this while you are still using the IP Address. I have wondered whether they might not do this to incent you to buy more expensive service packages, but let’s be charitable and assume that there’s some legitimate technical reason for doing so, like the need to reboot their server or something.
The upshot is that DHCP works fine for Internet consumption, but terrible for Internet publishing. Imagine your telephone number changed at sporadic and unpredictable intervals. It would still be relatively easy to make outgoing calls. But it’d be very hard to receive calls. No one would ever know your number!
This left those interested in Internet publishing scrambling for other alternatives. There’s another scheme called Virtual Hosts in which several web site domain names share a single, fixed IP address. But somebody still needs to buy that IP address. And like any scarce resource, the marketplace charges a premium for them. Plus most of those somebodies charge extra to let you run exactly the kinds of software you want (not unreasonable, since it takes work to administer all that software safely.)
So many gave up and published their content on other people’s web sites. That’s why most blogs are associated with a collective, often owned by a big company. But it wasn’t supposed to be this way! Those Founding Parents of the Internet never intended having a read/publish chasm. Even something as basic as pushing updates to visitors on a newspaper website is fabulously more complicated than it ever needed to be.
A few years ago I learned about a hack called Dynamic Domain Name System (Dynamic DNS). Basically, it employs a highly-responsive central registry to keep track of those etherial IP Address dealt out by DHCP. Whenever DHCP changes your IP, a program running on your computer notifies the registry. Everytime someone requests a resource from your web site, the Dynamic DNS registry nameserver resolves to your current IP address. Allowing you to publish a web site on your own computer without paying for a static IP address. In theory.
My brother and I both wanted to put up web sites on the cheap, so I set up a Dynamic DNS solution (hence bros.dyndns.org.) It worked okay. I’m not a network person, and getting Apache web server to do what we needed proved to be a little bit of a chore. But I learned a lot.
The biggest catch (and I don’t really understand why) was that I could never resolve my dynamic domain names from my own local network. I had to cheat by setting up entries in a special hosts file. This had the effect that certain DNS problems could be completely invisible to me, and I could never be sure our sites were ever really “up” without going out thru some kind of jurry-rigged HTTP mirror.
The other problem was my router. My router presents a bunch of disparate, fake IP addresses to the world a single, real (and DHCP-provided) IP Address. This enables me to use the Internet from more than one device on my local network over a single Internet account. Perhaps I didn’t really need a local network, but it made me feel more secure not to have our web sites served on the same computer I did my work on. And I didn’t need to worry about taking the sites down whenever I needed to reboot my desktop computer.
The combination of Dynamic DNS with a local router proved to be pretty much a disaster. Those fake IP Addresses were dealt out by the router, in much the same way that the DHCP server dealt out real IP addresses. The router was then configured (manually) to forward web requests to the appropriate fake IP Address. If the power went out and the computers rebooted, there was no guarantee they would get the same fake IP address! The practical effect of all this was that our web sites would often go down without my realizing it.
I probably could have set up a scheme in which all the machines on my local network, including visiting laptops, were permanently rooted to assigned, particular fake IP addresses. When the laptops left, they would have to have been de-configured back to potluck mode before they could be used on another local network.
At some point, you have to ask whether the configuration is serving your needs or you’re serving its. In fact, just seeing this all written out here in the blog entry makes me appreciate how unreasonable it was to go to all the trouble.
What ultimately pushed me over the edge was energy conservation. I have been looking closely at how many amps I draw lately, and could no longer justify having an entire computer on 24/7 just to serve a few dozen files. What if Al Gore found out, after all!
So this weekend, I took the plunge, purchased a remote Virtual Host account, and moved everything over. The new arrangement will cost a little more, but there should be a significant improvement in uptime. Thanks to Max over at webwizarddesign for all his help! I’m looking forward to not having to care about all this stuff anymore.