From: Kalin KOZHUHAROV <kalin@thinrope.net>
To: gentoo-server@lists.gentoo.org
Subject: Re: [gentoo-server] Re: Failover-capable DNS server?
Date: Mon, 21 Nov 2011 19:20:29 +0900 [thread overview]
Message-ID: <CAKXLc7dSYVQWnNfx+Vr-w_aVcB0Sv=ZqD7_spGQVJgFfg6_2fQ@mail.gmail.com> (raw)
In-Reply-To: <CAA2qdGUb1RvFoqDh5EwH78DJwoY+RkYwZe=NWiy+ROKq66f6GQ@mail.gmail.com>
On Mon, Nov 21, 2011 at 19:03, Pandu Poluan <pandu@poluan.info> wrote:
> On Mon, Nov 21, 2011 at 16:52, Pandu Poluan <pandu@poluan.info> wrote:
>> Hello all, I'm in need of some suggestions.
>>
>> You see, I have 2 Internet connections with public IP addresses, let's
>> say ISP A 11.22.33.44 and ISP B 22.33.44.66
>>
>> Now, I want outside parties trying to connect to "target.example.com"
>> by default resolves to 11.22.33.44, but if ISP A's connection goes
>> down for any reason, the DNS server will instead return "22.33.44.66".
>>
>> The nameserver itself will be located in the company, accessible from
>> the world via "ns1.example.com" = 11.22.33.44:53 or "ns2.example.com"
>> = 22.33.44.66:53. This allows the nameserver to monitor the state of
>> the connections to ISP A and ISP B.
>>
>> I've been perusing pages discussing BIND, and came to the conclusion
>> that BIND is incapable of doing that.
>>
>> Anyone can recommend me a DNS server that has such capability? Or how
>> to implement this ability with maybe Python or (*shivers*) Perl?
>>
>
> To illustrate further, here's the pseudo-language logic that I want to
> implement:
>
> if ( request == target1.example.com )
> {
> if ( state("ISP A") == "up" )
> {
> return "target1.example.com = 11.22.33.44"
> }
> else
> {
> return "target1.example.com = 22.33.44.66"
> }
> }
>
> if ( request == target2.example.com )
> {
> if ( state("ISP B") == "up" )
> {
> return "target2.example.com = 22.33.44.66"
> }
> else
> {
> return "target2.example.com = 11.22.33.44"
> }
> }
>
> So, as you can see, there are actually two targets, one defaults to
> ISP A (unless ISP A is down, then it 'falls back' to ISP B), and the
> other defaults to ISP B (unless ISP B is down, then it 'falls back' to
> ISP A).
>
Hello Pandu,
Even if you hack this somehow, do you want to check the link status on
each request?
Will you be able to handle say 10 requests per second? 100?
Of course you can implement some kind of caching (setting a flag of
the status and updating it every minute), but this will be the same as
having a short TTL for the A record.
Check http://cr.yp.to/djbdns.html, this is what I use for the last 10(+?) years.
And no solution is available (at DNS level) against
mis-configured/-behaving DNS caches caching for longer than the
specified TTL.
Cheers,
Kalin.
next prev parent reply other threads:[~2011-11-21 10:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 9:52 [gentoo-server] Failover-capable DNS server? Pandu Poluan
2011-11-21 10:02 ` Jos Houtman
2011-11-21 10:16 ` Pandu Poluan
2011-11-21 10:03 ` [gentoo-server] " Pandu Poluan
2011-11-21 10:20 ` Kalin KOZHUHAROV [this message]
2011-11-21 10:32 ` Christian Parpart
2011-11-21 10:20 ` [gentoo-server] " Chris Firth
2011-11-21 17:16 ` Alan Hodgson
2011-11-21 17:39 ` Pandu Poluan
2011-11-21 18:19 ` Alan Hodgson
2011-11-21 18:32 ` RES: " Eduardo Schoedler
2011-11-22 1:19 ` Pandu Poluan
2011-11-22 6:15 ` Norman Rieß
2011-11-22 6:48 ` Pandu Poluan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKXLc7dSYVQWnNfx+Vr-w_aVcB0Sv=ZqD7_spGQVJgFfg6_2fQ@mail.gmail.com' \
--to=kalin@thinrope.net \
--cc=gentoo-server@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox