DNS SRV namer not taking into account new DNS entries

Hello I am doing a proof of concept with the DNS SRV namer

I’ve found that if I register new entries in the DNS I have to restart linkerd for it to take into account the new registers for routing / load balancing

Is it possible to make linkerd to take into account these new registers without having to restart it?

I can see in the linkerd logs that the query to the DNS is running every 5s

But the new registers ain’t being taken into account for load balancing

Following you can find our config:

admin:
  ip: 0.0.0.0
  port: 9990

namers:
- kind: io.l5d.dnssrv
  experimental: true
  refreshIntervalSeconds: 5
  dnsHosts:
  - 172.17.0.1

routers:
- protocol: http
  identifier:
    kind: io.l5d.path
    segments: 1
    consume: false
  dtab: |
    /dnssrv => /#/io.l5d.dnssrv;
    /empresas =>
      /dnssrv/_empresas._tcp.lapso.com;
    /usuarios =>
      /dnssrv/_usuarios._tcp.lapso.com;
    /notificaciones =>
      /dnssrv/_notificaciones._tcp.lapso.com;
    /documentos =>
      /dnssrv/_documentos._tcp.lapso.com;
    /tareas =>
      /dnssrv/_tareas._tcp.lapso.com;
    /svc => /dnssrv;
    /svc/empresa => /empresas;
    /svc/usuario => /usuarios;
    /svc/notificacion => /notificaciones;
    /svc/documento => /documentos;
    /svc/tarea => /tareas;
  servers:
  - ip: 0.0.0.0
    port: 4140

Thank you for filing the issue - we’re going to look into it!

Hello @franzi we’ve been working on this issue during the weekend and now we have a working solution. It’s an alternative implementation of the dns lookup which doesn’t work with Futures at all. It works well according to our tests. If we add or remove srv records then the namer take into account these changes and load balance according to the new set of records.

We still don’t know why the original version don’t work (at least for us) but we started from the original code base and now it’s working.

Do you think someone can give it a look?

Hi @juanpablovergara. We’d be very interested in your code modificaitons. Would you mind opening up a PR?

Hi @siggy

Here’s the PR from Carlos Zuluaga, the developer who worked on the issue