|
When someone wants to create a new domain, he or she has to do two things:
- Find a name server for the domain name to live on.
- Register the domain name.
Technically, there does not need to be a machine in the domain
-- there just needs to be a name server that can handle the requests
for the domain name.
There are two ways to get a name server for a domain:
- You can create and administer it yourself.
- You can pay an ISP or hosting company to handle it for
you.
Most larger companies have their own domain name servers. Most
smaller companies pay someone.
To create a domain, you fill out a form with a company that
does domain name registration (examples: register.com, verio.com, networksolutions.com).
They create an "under construction page," create an entry in
their name server, and submit the form's data into the whois database.
Twice a day, the COM, ORG, NET, etc. name servers get updates
with the newest IP address information. At that point, a domain
exists and people can go see the "under construction" page.
www.mysite.com then started publishing content under the domain
www.mysite.com. We set up a hosting account with Tabnet (now
part of Verio, Inc.), and Tabnet ran the DNS for www.mysite.com
as well as the machine that hosted the www.mysite.com Web pages.
This type of machine is called a virtual Web hosting machine and
is capable of hosting multiple domains simultaneously. Five-hundred
or so different domains all shared the same processor.
As www.mysite.com became more popular, it outgrew the virtual
hosting machine and needed its own server. At that point, we
started maintaining our own machines dedicated to www.mysite.com,
and began administering our own DNS. We have a primary server
and a secondary:
- AUTH-NS1.mysite.com 209.116.69.78
- AUTH-NS2.mysite.com 209.116.69.79
Our primary DNS is auth-ns1.mysite.com. Any changes
we make to it propagate automatically to the secondary, which
is also maintained by our ISP.
All of these machines run name server software called BIND.
BIND knows about all of the machines in our domain through
a text file on the main server that looks like this:
@ NS auth-ns1.mysite.com.
@ NS auth-ns2.mysite.com.
@ MX 10 mail
mail A 209.170.137.42
vip1 A 216.183.103.150
www CNAME vip1
Decoding this file from the top, you can see that:
- The first two lines point to the primary and secondary
name servers.
- The next line is called the MX record.
When you send e-mail to anyone at mysite.com, the piece
of software
sending the e-mail contacts the name server to get the MX
record so it knows where the SMTP server for www.mysite.com
is. Many larger systems have multiple
machines handling incoming e-mail, and therefore multiple
MX records.
- The next line points to the machine that will handle a
request to mail.mysite.com.
- The next line points to the IP address that will handle
a request to oak.mysite.com.
- The next line points to the IP address that will handle
a request to mysite.com (no host name).
You can see from this file that there are several physical
machines at separate IP addresses that make up the www.mysite.com
server infrastructure. There are aliases for hosts like mail
and www. There can be aliases for anything. For example, there
could be an entry in this file for scoobydoo.mysite.com,
and it could point to the physical machine called walnut. There
could be an alias for yahoo.mysite.com, and it could
point to yahoo. There really is no limit to it. We could also
create multiple name servers and segment our domain.
The Beauty of DNS
As you can see from this description, DNS is a rather amazing distributed database.
It handles billions of requests for billions of names every day through a
network of millions of name servers administered by millions of people. Every
time you send an e-mail message or view a URL, you are making requests to
multiple name servers scattered all over the globe. What's amazing is that
the process is usually completely invisible and extremely reliable! |