From owner-freebsd-stable@FreeBSD.ORG Tue Sep 19 12:25:54 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97C5116A416 for ; Tue, 19 Sep 2006 12:25:54 +0000 (UTC) (envelope-from fred@clift.org) Received: from clift.org (clift.org [128.241.54.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48ED743D5D for ; Tue, 19 Sep 2006 12:25:52 +0000 (GMT) (envelope-from fred@clift.org) Received: from [192.168.2.51] (c-24-2-73-59.hsd1.mn.comcast.net [24.2.73.59]) (authenticated bits=0) by clift.org (8.13.6.20060614/8.13.6) with ESMTP id k8JCPoth098807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 19 Sep 2006 06:25:51 -0600 (MDT) Message-ID: <450FE15D.8050905@clift.org> Date: Tue, 19 Sep 2006 06:23:57 -0600 From: Fred Clift User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20060919120109.9DCDF16A74C@hub.freebsd.org> In-Reply-To: <20060919120109.9DCDF16A74C@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: bind round robin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 12:25:54 -0000 On Tue, Sep 19, 2006 at 02:00:23PM +0800, pinoyskull wrote: >> One of my client's domain has multiple IPs for redundancy, i configured >> his www as such >> >> www IN A 10.10.10.10 >> www IN A 192.168.0.10 >> >> Is there a way to prioritize 10.10.10.10 over 192.168.0.10? How do i >> configure it? I missed the original question about this but if you're really interested in doing somethign in software rather than buying some kind of load-balancing hardware, then you could write your own (simple) backend for powerdns. powerdns is in ports and it has a simple "pipe" interface to the daemon that would let you write your own "proporitional-share" dns responder for some set of RRs. Check out the geographic load balancing that the blitzed.org guys use... http://wiki.blitzed.org/DNS_balancing Basically, you would delegate a subdomain (bar.example.org) to the server running your custom powerdns config and all lookups of foo.bar.example.org would end up at your server, where your custome (20 or 60 lines of perl) powerdns module could return which ever of the two IPs you prefer, either statistically, or based on some kind of remotely fetched load average, ping time, other-availibility-metric, etc. So, say you wanted 80% of your traffic to go to the primary box, then you turn off caching in your powerdns config file and have your pipe'd child return the primary IP 8 times for every 2 times you return the ip of the other box etc. Or always return the primary server unless it is having problems, in which case you return the secondary. Of course you want the TTL on these records, or perhaps the delegated subdomain to be low so the client doesn't cache it much. I'm currently got a geo-balanced test setup I've been playing with - it returns CNAMES to XX.clift.org for any lookup of test.geo.clift.org, where XX are theoreticaly country codes based on what IP addresses you make the requests from. The quality of the free geo-ip info isn't great, but at least it gets you on the right continent. The geo-ip data is 'free' via rsync from countries.nerd.dk - see http://countries.nerd.dk/more.html for more information Anyway, it'd take a bit of work, but would be doable. Fred Clift fred 'AT' clift org