Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2134

SRV lookup does not handle failover correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • 7.1.0
    • DNS, HTTP

    Description

      I'm seeing an issue with SRV lookup in ATS in which the proxy doesn't fail over to alternative origins once the first choice is marked as down.

      To reproduce this, I'm running dnsmasq as a local resolver to serve up the test SRV records. My configuration is as follows.

      records.config

      CONFIG proxy.config.dns.nameservers STRING 127.0.0.1
      CONFIG proxy.config.dns.resolv_conf STRING NULL
      CONFIG proxy.config.srv_enabled INT 1

      remap.config

      regex_remap http://.*:8080/ https://noexample.com/

      dnsmasq.conf (srv records config)

      srv-host=_http._tcp.noexample.com,abc.com,443,0,100
      srv-host=_http._tcp.noexample.com,google.com,443,1,100

      The intention is since the srv lookup for _http._tcp.noexample.com returns abc.com:443 and google.com:443 with abc.com:443 being the one with higher priority, the proxy should try that first and once the connection to abc.com:443 is marked as down (up to 6 retries by default), google.com:443 should be tried next and the connection should succeed then.

      However, testing with the following curl command multiple times still gives back 502.

      $ curl -v http://localhost:8080/

      Debug log seems to suggest it always attempts abc.com:443.

      Attachments

        1. ats.log
          187 kB
          Thach Tran
        2. ts2134.patch
          4 kB
          Thach Tran

        Issue Links

          Activity

            People

              jacksontj Thomas Jackson
              thachtran Thach Tran
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: