we are using dnsmasq with local hosts file, which lists all servers
providing a given service. So the hosts file looks something like this:
In this case, dnsmasq returns a list of IP addresses when you query for
service1 and the list is randomized (or shifted by one apparently, which is
OK), so it serves as a primitive load balancer too, because the apps will
pick the first one. All is well.
But the problem arises, when there are many servers, that provide service1.
Because dnsmasq returns all of the IPs, the response does not fit into a
UDP packet (I assume) and some of the client apps have problem with that.
For example, dig will work, but will print at the beginning:
;; Truncated, retrying in TCP mode.
As I wrote, some apps, that we have little control over, cannot cope with
that. Now the question:
Can dnsmasq be made to return only a limited number of addresses? Three
would be enough, as long as they would be more or less randomly distributed
in each request.
Thanks for any ideas, how to solve this.
Dnsmasq-discuss mailing list