For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > June 2005 > Fwd: Re: POE::Component::Client::DNS woes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Fwd: Re: POE::Component::Client::DNS woes
Lari Huttunen

2005-06-09, 4:00 am

Oops, sorry forgot to CC: the list.

------ Original Message ------
Subject: Re: POE::Component::Client::DNS woes
To: Mathieu Longtin <mrdamnfrenchy@yahoo.com>
From: "Lari Huttunen" <perl-poe-001@huttu.net>
Date: Thu, 28 Apr 2005 21:39:57 +0300


On 21:00:51 28/04/2005 Mathieu Longtin <mrdamnfrenchy@yahoo.com> wrote:
> Hum, if the first DNS servers works, why should it try the
> other ones?


To even out the query load between the different servers, but yes I see
your point. :) Which means that I will probably have implement some kind
of a round-robin logic for the queries, maybe? I would like to use the
exisiting modules but what I was looking for is distribution of the query
load between many different nameservers.

--
Sincerely,

Lari Huttunen

Lance Braswell

2005-06-09, 4:00 am





Untested: "spawn" several several PoCo::Client::DNS aliases. You could
either strictly round-robin your posting to the spawned resolvers in
start_next_lookup. Or, if you really want to balance things out, keep up
with how many queries each resolver is currently handling by incrementing
some counter at the start of start_next_lookup and decrementing it in
got_answer. Then choose a resolver accordingly (don't forget to randomly
pick from resolvers that are available).
-
Lance Braswell - + 1 469 357 6112



"Lari Huttunen"
<perl-poe-001@hut
tu.net> To
<poe@perl.org>
04/28/2005 01:45 cc
PM
Subject
Fwd: Re:
Please respond to POE::Component::Client::DNS woes
<perl-poe-001@hut
tu.net>








Oops, sorry forgot to CC: the list.

------ Original Message ------
Subject: Re: POE::Component::Client::DNS woes
To: Mathieu Longtin <mrdamnfrenchy@yahoo.com>
From: "Lari Huttunen" <perl-poe-001@huttu.net>
Date: Thu, 28 Apr 2005 21:39:57 +0300


On 21:00:51 28/04/2005 Mathieu Longtin <mrdamnfrenchy@yahoo.com> wrote:
> Hum, if the first DNS servers works, why should it try the
> other ones?


To even out the query load between the different servers, but yes I see
your point. :) Which means that I will probably have implement some kind
of a round-robin logic for the queries, maybe? I would like to use the
exisiting modules but what I was looking for is distribution of the query
load between many different nameservers.

--
Sincerely,

Lari Huttunen



Lari Huttunen

2005-06-09, 4:00 am

On 22:29:14 28/04/2005 Lance_Braswell@i2.com wrote:
> Untested: "spawn" several several PoCo::Client::DNS aliases. You could
> either strictly round-robin your posting to the spawned resolvers in
> start_next_lookup.


So in other words would have one alias per nameserver and round-robin
those aliases? That sounds like the quick fix.

> Or, if you really want to balance things out, keep
> up with how many queries each resolver is currently handling by
> incrementing some counter at the start of start_next_lookup and
> decrementing it in got_answer. Then choose a resolver accordingly
> (don't forget to randomly pick from resolvers that are available).


So the same thing with aliases plus counters kept in the heap for each
posted query. Sounds a bit more complicated but will probably be the more
elegant solution.

Lance, thanks a lot for the input.

I'll give the first idea a try first. :)

--
Sincerely,

Lari Huttunen

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com