<div dir="ltr"><div><div><div><div><div>Hello everyone,<br><br></div>we are using dnsmasq with local hosts file, which lists all servers providing a given service. So the hosts file looks something like this:<br><br>172.26.1.245 service1<br>172.26.1.246 service1<br>172.26.1.247 service1<br>172.26.1.248 service1<br>172.26.1.249 service2<br>...<br><br></div>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.<br><br></div>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:<br>;; Truncated, retrying in TCP mode.<br><br></div>As I wrote, some apps, that we have little control over, cannot cope with that. Now the question:<br><br></div>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.<br><div><div><div><div><div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><br></div><div>Thanks for any ideas, how to solve this.<br></div><div><br></div>Michal<br><div><br></div></div></div></div>
</div></div></div></div></div></div></div></div></div>