- OT: DNS Records
- Posted by Andy Jacobs on October 20th, 2005
Just scratching my head trying to get to grips with some DNS things.
If I set up a domain with:
ns.nameserver.com > 123.123.123.123
ns2.anothernameserver.com > 234.234.234.234
And then set up different A records to point to different hardware, what
will happen to http requests?
1. It will ALWAYS got to ns.nameserver.com unless it can't be found in
which case it'll go to ns2.anothernameserver.com.
2. Sometimes it will go to one box and sometimes it'll go to the other
depending on the route that the request takes.
We want to set up a server to act as a backup. What we don't want is, for
example, to FTP into www.mydomain.com one day and get one box and then get
another box the next day.
Does that make sense?
Andy
- Posted by William Tasso on October 21st, 2005
Andy Jacobs <andy@redcatmedia.net> wrote:
Yes - after two reads.
Option #1: point your FTP client at the IP-Address of choice
Option #2: create an A record for FTP connections
--
William Tasso
- Posted by Andy Jacobs on October 21st, 2005
In article <op.syyy6ooo3jnr2w-wnt@tbdata.com>,
"William Tasso" <spamblocked@tbdata.com> wrote:
Thanks William. But what about visitors to the site? Would some go to
one box and some to the other? There are two ways that this *might*
work.
1. Load balancing - albeit in a non controllable way. i.e. half the
visitors go to ns.domain1.com and half go through ns.domain2.com. (Maybe
not half, but 'some' proportion)
2. Redundant - ns.domain1.com is down so requests go to ns.domain2.com
And what about e-mails? Could you get a case where an e-mail lands in
the popbox on the backup server and the client can't pick it up until
his machine decides to take the route to the second machine?
Andy
--
Andy Jacobs
www.redcatmedia.net
Intelligent Websites For Intelligent Business People
- Posted by Mark Goodge on October 21st, 2005
On Thu, 20 Oct 2005 16:17:14 +0000 (UTC), Andy Jacobs put finger to
keyboard and typed:
The second option. The user's DNS client will check the DNS servers
randomly, and then use (and cache) the results returned by that server
in order to access the hostname that it's trying to look up. So if the
two nameservers have different records, then people will randomly
access different machines.
You don't need different records on different nameservers if all you
want is rudimentary load-balancing. Assuming that box A is your
"master" and box B is the "slave" as far as web content is concerned,
then something like this in the DNS will do the job:
wwwa IN A 111.111.111.111
wwwb IN A 222.222.222.222
www IN CNAME wwwa
www IN CNAME wwwb
This means that anyone requesting www will randomly be given the
underlying IP address of either wwwa or wwwb. But you still have the
option to use either wwwa or wwwb directly if you want, either to
access that box directly for FTP purposes or as a way of checking that
the content is working correctly on both boxes.
One important thing to remember, though, is that this is purely
load-balancing, not redundancy. If one box goes offline, then users
won't all see just the other box, they'll get the live box half the
time and a failed connection the other half. To get around that, you'd
need to update the DNS to remove the pointer to the failed box, which
isn't instantaneous. True "hotswap" redundancy can't be acheived
simply with DNS.
Mark
--
http://www.MotorwayServices.info - share your comments!
"My light will shine so brightly it will blind you"
- Posted by Richard Watson on October 21st, 2005
Andy Jacobs wrote:
Yes, that would be too far back really. If you wanted to do something
similar to load balancing you would create an A record for the www host
with more than 1 IP number.
DNS always works in this kind of way. It's one of the good things about it.
Well of course you can have a separate host for the mail as well that
doesn't change.
I don't really understand what you're trying to achieve. DNS fails over
automatically. Nothing else will fail over unless you put something in
place to make it so. DNS doesn't have a priority like MX records do, so
to the outside world there isn't a primary and secondary, only 2 equal
name servers.
One way to fail over would be to have a shortish TTL on the www record
so that if something went down you could update the DNS and fail over to
the secondary host.
--
Richard Watson
- Posted by Andy Jacobs on October 21st, 2005
On 21/10/05 8:26 am, in article dja581$jq2$1@news.freedom2surf.net, "Richard
Watson" <tinnedmeat@doilywood.org.uk> wrote:
Thanks for that Richard. What we're trying to achieve is a simple
redundancy. So we have server a and server b. What I was hoping is that
server a would ALWAYS be the primary server and server b would only come
into play if server a went down. That way, we could have a cheap server as
server b just to act as a stop gap if server a went down. We wanted this to
be automatic - i.e. No need to update anything if server a goes down,
requests to www.mydomain.com see that server a isn't responding and then try
server b.
I think Mark has answered the question though by saying that it's random.
Cheers
Andy
- Posted by Andy Jacobs on October 21st, 2005
On 21/10/05 8:01 am, in article
kv3hl11au02ru49r56hljj34iq9cdvrima@n...rksho use.net, "Mark Goodge"
<usenet@listmail.good-stuff.co.uk> wrote:
I think you've answered the question. We wanted redundancy. Your comment
about it being random on server a or server b is what I was trying to
establish.
Cheers
Andy
- Posted by Andy Jacobs on October 21st, 2005
On 21/10/05 8:26 am, in article dja581$jq2$1@news.freedom2surf.net, "Richard
Watson" <tinnedmeat@doilywood.org.uk> wrote:
Just to illustrate my fear, take the example of a database driven site using
a CMS. The client logs into www.mydomain.com/cmsadmin, hits server a and
makes some changes. The database gets updated. A visitor comes along and
views the site but doesn't see the updates as the random element means that
they end up hitting server b and don't see the changes, or vice versa.
I think the upshot is that it ain't gonna work
)
Andy
- Posted by Richard Watson on October 21st, 2005
Andy Jacobs wrote:
Yeah, basically you can't do that with DNS. I've thought a number of
times how cool it would be if you could, and really there's no reason
why the spec couldn't be extended, it just doesn't seem to have been yet.
You wanted it to be easy? What do you think keeps system/network admin
types in beer?
;-)
--
Richard Watson
- Posted by Andy Jacobs on October 21st, 2005
On 21/10/05 9:37 am, in article dja9bm$l9b$1@news.freedom2surf.net, "Richard
Watson" <tinnedmeat@doilywood.org.uk> wrote:
I think your days are numbered
) Just installed a 10 quid version of
BlueQuartz on an old 1gig machine in the office and it was sooo easy to
setup. Just waiting for my a records to kick it to see if it's as easy as I
think. If it isn't, send me your address and I'll send you some beer!
Andy


