Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2001 16:26:28 +0100
From:      Mark Drayton <mark.drayton@4thwave.co.uk>
To:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: (2) DNS primary secondary question
Message-ID:  <20010405162628.A13663@tethys.valhalla.net>
In-Reply-To: <Pine.A41.4.10.10104051729440.44098-100000@bessel.tekniikka.turkuamk.fi>; from eyurtese@turkuamk.fi on Thu, Apr 05, 2001 at 05:35:14PM %2B0300
References:  <Pine.GSO.4.30.0104040818590.17735-100000@corten8> <Pine.A41.4.10.10104051729440.44098-100000@bessel.tekniikka.turkuamk.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Evren Yurtesen (eyurtese@turkuamk.fi) wrote:
> actually what I wanted to know that if it is possible to have 2
> seperate web sites at different locations and in each server have an
> dns server which points the www.foobar.com to itself then we set
> foobar.com dns servers as primary x.x.x.x and secondary y.y.y.y 
> 
> x.x.x.x is the ip of one site y.y.y.y is the ip of the other site

I'm a bit confused here. This *might* work, but there's a simpler
solution. 

> so we would have virtually some kind of load balance and in the case
> when there is a problem with x.x.x.x site all the clients would go to
> y.y.y.y site automaticly becuase they cant reach to the dns server of
> x.x.x.x they would by default try the y.y.y.y site's server since it
> is secondary (or primary) and it points back to itself.

Like I said before, primary nameservers don't have precedence over
secondaries. If you want simple load balancing you need to use multiple
A records for the same hostname.

So, in foo.com's zone file, you need:

www   IN   A   x.x.x.x
www   IN   A   y.y.y.y

This is called 'round robin DNS'. The name www.foo.com should
alternately resolve to each of the IP addresses, providing rudimentary
load balancing. However, should one of the IP address become unreachable
for some reason half of the web requests will fail (as half of the
requests will be going to the broken IP).

Using this scheme it doesn't matter where your nameservers are as long
as there are publically accessable.

Cheers,

-- 

Mark Drayton

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010405162628.A13663>