question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

akka-discovery-service-locator eagerly uses DNS-SRV Lookups

See original GitHub issue

akka-discovery-service-locator is a ServiceLocator implementation that produces Akka Discovery Lookup() queries which are then resolved by the underlying AkkaDiscovery instance.

The Lagom bridge from ServiceLocator takes a single String as an input and eagerly uses default portName and protocol values to produce Lookup(name, portName, protocol) queries. When Akka Discovery is setup to use akka-dns that Lookup query is turned into a DNS SRV request.

The issue is Lagom users are no longer able to generate DNS A requests since the combination of akka-discovery-service-locator and akka-dns only creates DNS SRV queries.

This is an issue when a Lagom client wants to consume a service that provides server-side load balancing and only expose DNS A registries.


The current workaround is to tune AkkaDiscovery to use an aggregate implementation and hardcode the response to a Lookup query for an external service:

akka {
  discovery {
    method = aggregate
    aggregate {
      discovery-methods = ["config", "akka-dns"]
    }
    config {
      services {
		## same value than below. Will shortcircuit the lookup 
		## and avoid query failure on the DNS
        external-service {
          endpoints = [
            {
              host = "api.external.io"
              port = 443
            }
          ]
        }
      }
    }
  }
}

lagom.akka.discovery {
  defaults {...}
  service-name-mappings {
    ## same value than above
    external-service { 
        ## no need to use the `lookup` setting
        scheme = https
    }
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
octonatocommented, Jan 10, 2020

@ralphlaude, next time. You can just pick an issue and leave a note saying you are working on it.

We lost your message in the see of GitHub notifications we get daily.

0reactions
octonatocommented, Jan 10, 2020

@ralphlaude, my excuses. I see you asked if you could pick this one to work. In fact, this is fixed by #2603. Once it’s merged, I don’t think there is any work left.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Akka Discovery Integration - Lagom Framework
AkkaDiscoveryServiceLocator supports DNS SRV as well as DNS A lookups. It defaults to SRV lookups since it's the most common usage in environments...
Read more >
Verify that SRV Domain Name System (DNS) records have ...
To verify SRV locator resource records for a domain controller, use one of the following methods. Method 1: Use DNS Manager. After you...
Read more >
What is a DNS SRV record? - Cloudflare
A DNS SRV record specifies a port within a server for certain services. Learn how SRV records are configured, and why some services...
Read more >
vserver services access-check dns srv-lookup
The vserver services access-check dns srv-lookup returns the IP addresses of a host that is providing the specified service in the network, based...
Read more >
How to check the DNS SRV records used by InformaCast?
How to check the DNS SRV records used by InformaCast Desktop Notifier for service discovery of an InformaCast server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found