Question

I have to make a DNS lookup for SRV records in Android application and choose the select one of them. When I query a DNS server for multiple SRV records differ in priority and weight, I get the records in different order on each request, are these records ordered by the server? if yes what is the order algorithm?

I guessed it respects the priority as the lower priority is most preferred, but in case the priority is equal I supposed it will respect the weight in a round-robin style, which did not happen!

I had a simple bind9 DNS server with 2 SRV records as follow:


Domain Priority Weight


aaa.example.com 1 90


bbb.example.com 2 10

When I lookup, I expected to get the aaa.example.com 9 times as first result and the 10th I would get bbb.example.com as first result, which did not happen!, the server just reverse the order on each request!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top