Forum Discussion

devious_381979's avatar
devious_381979
Icon for Nimbostratus rankNimbostratus
Jan 23, 2019

GTM and SRV Records

Hello

 

We have been asked by our customer to provide DNS resolution based on geography, e.g. US clients get given a US server IP, European clients a European server IP etc. Topology records are clearly a good fit here in terms of technology. There is one thing, however, which I'm a little stumped by, simply because I've never worked with them. They are SRV records.

 

From what I've have read about SRV records & what I know about the GTM it looks like we cannot use Topology records in the same way as standard A records.

 

I know this question might at first sound a little vague but would appreciate a steer on this one from the community. What things I need to consider? Can this even work? Any other questions to ask them to try get to a resolution everyone can be happy with.

 

Thank you.

 

  • Hi Devious,

    a SRV records is basically an extended CNAME record with additonal a Weigth/Priority/Port values for the resolved HOST-Name(s).

    when DNS_REQUEST { 
    
         Searching for DNS request for SRV = _sip._tcp.domain.de
    
        if { ( [string tolower [DNS::question name]] equals "_sip._tcp.domain.de"  ) 
         and ( [DNS::question type] equals "SRV" ) } then {
    
                 Defining DNS answer for the requested SRV record (Question Name = _sip._tcp.domain.de., ttl = 600, class = IN, type = SRV, priority = 100, weight = 100, port = 5060, hostname = sip.domain.de ) 
    
                DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 10 100 5060 sip1.domain.de"
                DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 20 100 5060 sip2.domain.de"
    
                 Changing "Authorative Answer" DNS header to true.
    
                DNS::header aa 1 
    
                 Sending the DNS response
    
                DNS::return
    
            }
        }
    }
    

    After your DNS client gets the SRV response, it will perform an additional A or AAAA query for the just received HOST names. The subsequent A or AAAA request may then target a wide-IP as usuall...

    Note: The SRV response may already include the A or AAAA DNS responses for the just resolved HOST names to speed up DNS resolution. To make those additional A or AAAA DNS answers GLBS aware you would need a handcrafted logic to perform the country checks and flip the IP based on those information. Its not rocket science, but still far more complicated than using two independent DNS queries/responses...:-)

    Cheers, Kai

  • Don’t mean to bump this up but also wondered - is it possible an SRV record could have a target/resource that is itself a Wide IP and therefore we could utilise Topology load balancing?

     

    For example:

     

    _sip._tcp.wideipname