Akka.Discovery.Dns
1.5.70
Prefix Reserved
dotnet add package Akka.Discovery.Dns --version 1.5.70
NuGet\Install-Package Akka.Discovery.Dns -Version 1.5.70
<PackageReference Include="Akka.Discovery.Dns" Version="1.5.70" />
<PackageVersion Include="Akka.Discovery.Dns" Version="1.5.70" />
<PackageReference Include="Akka.Discovery.Dns" />
paket add Akka.Discovery.Dns --version 1.5.70
#r "nuget: Akka.Discovery.Dns, 1.5.70"
#:package Akka.Discovery.Dns@1.5.70
#addin nuget:?package=Akka.Discovery.Dns&version=1.5.70
#tool nuget:?package=Akka.Discovery.Dns&version=1.5.70
Discovery via DNS
This module provides a service discovery mechanism that uses DNS to locate services. It supports both A/AAAA record resolution and SRV record resolution for service discovery.
DNS discovery can resolve services using:
- A/AAAA records: Standard DNS address records that return IP addresses
- SRV records: Service records that provide both IP addresses and port information
Enabling DNS Discovery Using Akka.Hosting
To enable DNS discovery using Akka.Hosting, you can use the WithDnsDiscovery extension method:
builder.WithDnsDiscovery();
For SRV record resolution, you also need to configure the async DNS resolver with custom nameservers:
builder.WithAsyncDnsResolver(opt =>
{
opt.Nameservers = [ // at least one nameserver is required
"127.0.0.1:1053", // IPv4 with port
"[fd::aa:aa:aa:aa]", // IPv6 without port (default is 53)
"1dot1dot1dot1.cloudflare-dns.com" // Hostname
];
});
Note: The default port for DNS is 53, so if you don't specify a port, it will use 53. DNS hostname would be resolved using the default System.Net.Dns.GetHostAddresses method.
Enabling DNS Discovery Using HOCON Configuration
To enable DNS discovery via HOCON, you will need to modify your HOCON configuration:
akka.discovery.method = dns
Below, you'll find the default configuration. It can be customized by changing these values in your HOCON configuration:
akka.discovery.dns {
class = "Akka.Discovery.Dns.DnsServiceDiscovery, Akka.Discovery.Dns"
}
To enable async-dns resolver, you need to configure it in your HOCON configuration:
akka.io.dns.resolver = async-dns
akka.io.dns.async-dns {
provider-object = "Akka.Discovery.Dns.Internal.AsyncDnsProvider, Akka.Discovery.Dns"
nameservers = [ "127.0.0.1:53"; "my-dns.example.com"; "[::1]:53" ]
cache-cleanup-interval = 120s
positive-ttl = forever
}
NOTES
async-dnsresolver doesn't use System.Net.Dns.GetHostAddresses method to resolve DNS hostname, therefore it has no way to determine DNS nameserver from the runtime environment. You need to configure it explicitly.async-dnsresolver is required to resolve SRV records.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Akka.Discovery (>= 1.5.70)
- Akka.Hosting (>= 1.5.68)
-
net6.0
- Akka.Discovery (>= 1.5.70)
- Akka.Hosting (>= 1.5.68)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.70 | 125 | 8/18/2026 |
| 1.5.68 | 1,090 | 5/31/2026 |
| 1.5.67 | 121 | 4/28/2026 |
| 1.5.65 | 126 | 4/11/2026 |
| 1.5.63 | 125 | 3/31/2026 |
| 1.5.62 | 235 | 3/9/2026 |
| 1.5.61 | 934 | 2/27/2026 |
| 1.5.59 | 150 | 1/27/2026 |
| 1.5.57 | 331 | 12/16/2025 |
| 1.5.55 | 244 | 10/27/2025 |
| 1.5.52 | 246 | 10/10/2025 |
| 1.5.50 | 242 | 9/23/2025 |
| 1.5.48 | 280 | 8/29/2025 |
* Update to [Akka.NET v1.5.70](https://github.com/akkadotnet/akka.net/releases/tag/1.5.70)
* Update to [Akka.Hosting v1.5.70](https://github.com/akkadotnet/Akka.Hosting/releases/tag/1.5.70)
* **New package: [`Akka.Discovery.Redis`](Akka.Discovery.Redis)** — Redis-based service discovery for Akka.Cluster.Bootstrap. Each node registers under a TTL key and refreshes it on a heartbeat; dead nodes expire automatically (no separate pruning process) and stale entries are filtered out of lookups. A lightweight alternative to `Akka.Discovery.Azure`, well suited to Redis-backed environments and .NET Aspire local development. ([#3444](https://github.com/akkadotnet/Akka.Management/pull/3444))
* **New: .NET Aspire integration** — [`Akka.Aspire.Hosting`](Akka.Aspire.Hosting) (AppHost side) and [`Akka.Aspire`](Akka.Aspire) (service side) bring automated Akka.NET cluster formation to [.NET Aspire](https://learn.microsoft.com/dotnet/aspire). Declare the discovery backend and replica count in your AppHost, and each service replica auto-discovers its peers, forms a cluster, and reports readiness through a health check — no manual HOCON. ([#3445](https://github.com/akkadotnet/Akka.Management/pull/3445))