From owner-freebsd-questions Thu Apr 5 8:26:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tethys.valhalla.net (tethys.valhalla.net [195.26.32.112]) by hub.freebsd.org (Postfix) with ESMTP id DD31D37B424 for ; Thu, 5 Apr 2001 08:26:29 -0700 (PDT) (envelope-from mark@tethys.valhalla.net) Received: by tethys.valhalla.net (Postfix, from userid 500) id E861432E7E; Thu, 5 Apr 2001 16:26:28 +0100 (BST) Date: Thu, 5 Apr 2001 16:26:28 +0100 From: Mark Drayton To: freebsd-questions Subject: Re: (2) DNS primary secondary question Message-ID: <20010405162628.A13663@tethys.valhalla.net> Mail-Followup-To: freebsd-questions References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eyurtese@turkuamk.fi on Thu, Apr 05, 2001 at 05:35:14PM +0300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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