DNS load-balancing

shakaxl

New Member
Joined
Apr 13, 2021
Messages
18
Reaction score
3
Credits
179
Hi everyone

I am in an implementation of a network service, but I got the query if it is possible to do some kind of balancing in the Bind Linux DNS server.
Stage
Guest endpoint will communicate via wireless to a captive portal to login, this login page is provided by a server with IP example 1.1.1.1, another redundant server with IP 1.1.1.2 has been placed.
The idea is if server 1.1.1.1 goes down, server 1.1.1.2 will answer the requests.
In my dns server I would have to do
guest IN 1.1.1.1
guest IN 1.1.1.2
From a DNS perspective I see that it will always resolve to these 2 IP's but you won't be able to tell if one of the servers is down.
Once the clients have these 2 IPs in their dns cache, they will continue to use them.
I understand that it would be best to use a specialized hardware balancer for this task.
I would be grateful if someone could give me some suggestion if something could be done at the DNS server level and in any case, in what scenario is DNS load-balancing used?

Thank you very much
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,619
Reaction score
3,325
Credits
33,517
Or you could just try setting the TTL to 0(zero) of two A records, creating a round-robin which would look like this.
Code:
service1.example.com        0   IN    A    1.1.1.1
service1.example.com        0   IN    A    1.1.1.2
Since I would expect the service to use a sub-domain it shouldn't be too bad having a ttl of 0(zero) for a specific service if you want to use dns load-balancing. The other option would be to run the service on a multi-node cluster setup where the ip address can be moved to one of the other nodes when the current active node becomes unavailable and the new active nodes is one of the current passive ones.
 
Last edited:
OP
S

shakaxl

New Member
Joined
Apr 13, 2021
Messages
18
Reaction score
3
Credits
179
@f33dm3bits @dos2unix thanks for the information, I saw that to do balancing to querys(example host in type A down), you need a balancer appliance or software upper layer.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top