akka-discovery-service-locator eagerly uses DNS-SRV Lookups
See original GitHub issueakka-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:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@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.
@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.