Choosing A records based on hosts' load?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Choosing A records based on hosts' load?

Marek Kozlowski-2
:-)

I believe that such a solution (read to install) should exist.
Unfortunately I don't know the magic keywords to find it:

I have a group of hosts with different IPs offering the same services.
I'm able to install some agents on them for monitoring their
network/cpu/number of users/whatever utilization. I'm wondering if there
is an option for BIND9 to obtain those load parameters on a regular
basis (let's say: every 10 minutes) and when queried for the A record
return ONLY one IP address - the one of the server with the lowest
utilization?

It can be implemented on those servers but in the solution I'm asking
about the key point is that the BIND server takes the decision.

Thanks in advance,
best regards,
Marek
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Reindl Harald


Am 18.01.21 um 09:49 schrieb Marek Kozlowski:

> :-)
>
> I believe that such a solution (read to install) should exist.
> Unfortunately I don't know the magic keywords to find it:
>
> I have a group of hosts with different IPs offering the same services.
> I'm able to install some agents on them for monitoring their
> network/cpu/number of users/whatever utilization. I'm wondering if there
> is an option for BIND9 to obtain those load parameters on a regular
> basis (let's say: every 10 minutes) and when queried for the A record
> return ONLY one IP address - the one of the server with the lowest
> utilization?
>
> It can be implemented on those servers but in the solution I'm asking
> about the key point is that the BIND server takes the decision.

this can't work - only a minority of clients is asking your nameserver
directly, most talk to caches

you try to solve the problem on the wrong side
you need a loadbalancer in front of the cluster
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Marek Kozlowski-2
:-)

On 1/18/21 9:59 AM, Reindl Harald wrote:

> Am 18.01.21 um 09:49 schrieb Marek Kozlowski:
>> I believe that such a solution (read to install) should exist.
>> Unfortunately I don't know the magic keywords to find it:
>>
>> I have a group of hosts with different IPs offering the same services.
>> I'm able to install some agents on them for monitoring their
>> network/cpu/number of users/whatever utilization. I'm wondering if
>> there is an option for BIND9 to obtain those load parameters on a
>> regular basis (let's say: every 10 minutes) and when queried for the A
>> record return ONLY one IP address - the one of the server with the
>> lowest utilization?
>>
>> It can be implemented on those servers but in the solution I'm asking
>> about the key point is that the BIND server takes the decision.
>
> this can't work - only a minority of clients is asking your nameserver
> directly, most talk to caches
>
> you try to solve the problem on the wrong side
> you need a loadbalancer in front of the cluster

The problem is: I'm supervising the BIND. I'm NOT supervising the other
servers. Their admins requested such a solution. Personally I agree with
your opinion but... The question is: is there such a ready solution as I
described?

Best regards,
Marek
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Giles Coochey

On 18/01/2021 09:04, Marek Kozlowski wrote:
>
> The problem is: I'm supervising the BIND. I'm NOT supervising the
> other servers. Their admins requested such a solution. Personally I
> agree with your opinion but... The question is: is there such a ready
> solution as I described?
>
>
As others mentioned, this often will not work unless all your clients
are directly accessing the DNS server for their requests (e.g. an
internal authoritative server). I don't know how this can be achieved
with Bind, but you can achieve it with LUA in PowerDNS.

https://doc.powerdns.com/authoritative/lua-records/


--
Giles Coochey

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Reindl Harald
In reply to this post by Marek Kozlowski-2


Am 18.01.21 um 10:04 schrieb Marek Kozlowski:

> :-)
>
> On 1/18/21 9:59 AM, Reindl Harald wrote:
>> Am 18.01.21 um 09:49 schrieb Marek Kozlowski:
>>> I believe that such a solution (read to install) should exist.
>>> Unfortunately I don't know the magic keywords to find it:
>>>
>>> I have a group of hosts with different IPs offering the same
>>> services. I'm able to install some agents on them for monitoring
>>> their network/cpu/number of users/whatever utilization. I'm wondering
>>> if there is an option for BIND9 to obtain those load parameters on a
>>> regular basis (let's say: every 10 minutes) and when queried for the
>>> A record return ONLY one IP address - the one of the server with the
>>> lowest utilization?
>>>
>>> It can be implemented on those servers but in the solution I'm asking
>>> about the key point is that the BIND server takes the decision.
>>
>> this can't work - only a minority of clients is asking your nameserver
>> directly, most talk to caches
>>
>> you try to solve the problem on the wrong side
>> you need a loadbalancer in front of the cluster
>
> The problem is: I'm supervising the BIND. I'm NOT supervising the other
> servers. Their admins requested such a solution. Personally I agree with
> your opinion but... The question is: is there such a ready solution as I
> described?

i doubt that someone wrote arelieable solution, it's just not the job of
dns and even if such a solution exists it's not well tested/maintained
by lack of consumers

reject the request with "i don't solve issues outside my responsibility
ignoring best practices"

that starts starts with agents (network/cpu/number of users/whatever
utilization) where you suddenly mix responsibilities

what does it mean for sour nameservers if that agents itself are
overloaded? does it reduce the quality or even bring down nameservices?

solve problems where they exist instead compromise additional services -
bind itself can't do it anyways, it would be whatever software which
decides to update the dns-zone runniong outside of named
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Matus UHLAR - fantomas
In reply to this post by Marek Kozlowski-2
On 18.01.21 09:49, Marek Kozlowski wrote:

>I believe that such a solution (read to install) should exist.
>Unfortunately I don't know the magic keywords to find it:
>
>I have a group of hosts with different IPs offering the same services.
>I'm able to install some agents on them for monitoring their
>network/cpu/number of users/whatever utilization. I'm wondering if
>there is an option for BIND9 to obtain those load parameters on a
>regular basis (let's say: every 10 minutes) and when queried for the A
>record return ONLY one IP address - the one of the server with the
>lowest utilization?

and whenever one of servers hits the lowest utilization, all connections get
directed to it, which will result in highest utilization.

>It can be implemented on those servers but in the solution I'm asking
>about the key point is that the BIND server takes the decision.

This is not problem for BIND nor for DNS.
Due to DNS caching it won't work properly and if you shorten the TTLs, at
first DNS issue it will fail globally.

Install some load balancers in front of those servers.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Nothing is fool-proof to a talented fool.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Giles Coochey

On 18/01/2021 09:20, Matus UHLAR - fantomas wrote:
>
> This is not problem for BIND nor for DNS. Due to DNS caching it won't
> work properly and if you shorten the TTLs, at
> first DNS issue it will fail globally.
>
Sometimes, rather than explain all the issues (and there are many!) that
you will encounter trying this method, I think it is better to just give
someone the tools (with a warning), and let them discover all the
problems for themselves. People are often set in their ways to trying to
achieve something, and the only way to convince them that it is not good
practice is to give them the tools to attempt it, and let them discover
why it doesn't work as they expected.
> Install some load balancers in front of those servers.
>
Yes - that is the best option.

--
Giles Coochey

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Bind-Users forum mailing list
In reply to this post by Marek Kozlowski-2
Hi Marek,

One way you can handle this sort of situation is with Varnish Cache. You can use it as a load balancer but it also has a lot of control over the actual flow of requests, etc. that you can use to accomplish various outcomes.  

One relevant documentation.  https://varnish-cache.org/docs/trunk/users-guide/vcl-backends.html#connection-pooling

Sorry to clutter the group here, but trying to assist w redirect of this question to a non-DNS direction since numerous BIND folks here saying not technically on-topic.

Tyler


> On Jan 18, 2021, at 1:49 AM, Marek Kozlowski <[hidden email]> wrote:
>
> :-)
>
> I believe that such a solution (read to install) should exist. Unfortunately I don't know the magic keywords to find it:
>
> I have a group of hosts with different IPs offering the same services. I'm able to install some agents on them for monitoring their network/cpu/number of users/whatever utilization. I'm wondering if there is an option for BIND9 to obtain those load parameters on a regular basis (let's say: every 10 minutes) and when queried for the A record return ONLY one IP address - the one of the server with the lowest utilization?
>
> It can be implemented on those servers but in the solution I'm asking about the key point is that the BIND server takes the decision.
>
> Thanks in advance,
> best regards,
> Marek
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users


_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Choosing A records based on hosts' load?

Ondřej Surý
In reply to this post by Marek Kozlowski-2
There’s nothing magical needed here, you can write a script that would modify the zone directly (and do rndc reload) or use nsupdate to modify the record directly in the named.

Whether it’s good idea or not... I’ll let you experience the failure of making decisions on the wrong layer...

Ondrej
--
Ondřej Surý — ISC (He/Him)

> On 18. 1. 2021, at 9:49, Marek Kozlowski <[hidden email]> wrote:
>
> :-)
>
> I believe that such a solution (read to install) should exist. Unfortunately I don't know the magic keywords to find it:
>
> I have a group of hosts with different IPs offering the same services. I'm able to install some agents on them for monitoring their network/cpu/number of users/whatever utilization. I'm wondering if there is an option for BIND9 to obtain those load parameters on a regular basis (let's say: every 10 minutes) and when queried for the A record return ONLY one IP address - the one of the server with the lowest utilization?
>
> It can be implemented on those servers but in the solution I'm asking about the key point is that the BIND server takes the decision.
>
> Thanks in advance,
> best regards,
> Marek
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users