Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
13f5341
init Akka.Discovery.Dns
anpin Jul 3, 2025
94f10eb
init dns cluster example
anpin Jul 4, 2025
a970620
SRV example cluster is starting
anpin Jul 8, 2025
398cecb
cleanup commented code and typos
anpin Jul 14, 2025
20e50b2
Custom override for DnsExt is no longer required
anpin Jul 14, 2025
2230205
fix IPv6 formating
anpin Jul 14, 2025
f7eccd6
fix logging of parsed IP records
anpin Jul 14, 2025
533fe19
separate A and AAAA examples
anpin Jul 14, 2025
8740cff
use dns.oci root domain instead of default dns.podman for runtime ind…
anpin Jul 14, 2025
fbec5dc
use docker-compose to run examples as it is more common
anpin Jul 14, 2025
e26b4df
fix reference HOCON
anpin Jul 14, 2025
3d8fc58
cleanup hosting extensions
anpin Jul 14, 2025
ec1f100
make internals availiable to tests
anpin Jul 14, 2025
ab83854
tests for DNS lookup and config parsing
anpin Jul 14, 2025
e0604da
Handle multiple nameservers
anpin Jul 15, 2025
63965f1
Cache for async-dns resolver
anpin Jul 15, 2025
3a56d5d
Refactor AsyncDnsClient:
anpin Jul 16, 2025
d90920f
Add IDnsProviderWithSrvLookup and refactor tests
anpin Jul 16, 2025
59b0b20
test TCP fallback client
anpin Jul 17, 2025
23763fa
Add missing options to hosting extension
anpin Jul 17, 2025
152962b
remove leaked local dev settings
anpin Jul 17, 2025
24b6641
Upgrade to Akka.NET v1.5.46
anpin Jul 17, 2025
dc46749
Merge branch 'dev' into feature/dns
Aaronontheweb Jul 17, 2025
9d5fb64
skip check of AAAA records on Windows with default resolver
anpin Jul 17, 2025
6a86444
update docs
anpin Jul 17, 2025
bdeb2a2
fix compiler warnings and slight cache refactor
anpin Jul 18, 2025
0cc31bb
Add additional records to lookup result
anpin Jul 18, 2025
f20720b
add doc comments
anpin Jul 18, 2025
13e8c07
reduce line noise
anpin Jul 18, 2025
01da986
Merge branch 'dev' into feature/dns
Aaronontheweb Jul 18, 2025
17c1896
Fix/add documentation
Arkatufus Jul 21, 2025
e3c5320
make constructors for immutable messages private
anpin Jul 22, 2025
29f5883
Make TcpDropped message immutable and handle it
anpin Jul 22, 2025
287fb0b
Remove unreferenced DropRequest message and handlers
anpin Jul 22, 2025
b61745b
Reply with error on TCP failure
anpin Jul 22, 2025
1b2deab
Refactor query ID generation
anpin Jul 22, 2025
5351c9c
applied copilot suggestions
anpin Jul 29, 2025
04917ac
add better comment
anpin Jul 29, 2025
2cf78c9
Merge branch 'dev' into feature/dns
Aaronontheweb Jul 29, 2025
b01100e
Fix DNS resolution in cluster bootstrap examples
Aaronontheweb Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Akka.Management.sln
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.StressTest", "src\coo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoconKubernetesCluster", "src\cluster.bootstrap\examples\discovery\hocon-kubernetes\src\HoconKubernetesCluster\HoconKubernetesCluster.csproj", "{7015572E-6225-4F32-A00C-4D52280E6C94}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dns", "dns", "{CF2BA83A-4CF9-4E29-9128-A7A3D3ADBB35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Discovery.Dns", "src\discovery\dns\Akka.Discovery.Dns\Akka.Discovery.Dns.csproj", "{5C5403F4-F496-4246-8BEC-E125E1A2BC94}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Discovery.Dns.Tests", "src\discovery\dns\Akka.Discovery.Dns.Tests\Akka.Discovery.Dns.Tests.csproj", "{2E13DE8F-0001-4008-A066-B66B4B640915}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DnsCluster", "src\cluster.bootstrap\examples\discovery\dns\src\DnsCluster.csproj", "{24B1214E-CFE2-44C0-9B0D-8139C269EED5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -174,6 +182,18 @@ Global
{7015572E-6225-4F32-A00C-4D52280E6C94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7015572E-6225-4F32-A00C-4D52280E6C94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7015572E-6225-4F32-A00C-4D52280E6C94}.Release|Any CPU.Build.0 = Release|Any CPU
{5C5403F4-F496-4246-8BEC-E125E1A2BC94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C5403F4-F496-4246-8BEC-E125E1A2BC94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C5403F4-F496-4246-8BEC-E125E1A2BC94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C5403F4-F496-4246-8BEC-E125E1A2BC94}.Release|Any CPU.Build.0 = Release|Any CPU
{2E13DE8F-0001-4008-A066-B66B4B640915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E13DE8F-0001-4008-A066-B66B4B640915}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E13DE8F-0001-4008-A066-B66B4B640915}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E13DE8F-0001-4008-A066-B66B4B640915}.Release|Any CPU.Build.0 = Release|Any CPU
{24B1214E-CFE2-44C0-9B0D-8139C269EED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24B1214E-CFE2-44C0-9B0D-8139C269EED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24B1214E-CFE2-44C0-9B0D-8139C269EED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24B1214E-CFE2-44C0-9B0D-8139C269EED5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -209,6 +229,10 @@ Global
{296A0309-2370-4153-B3B0-A4105622CC9A} = {C4C8BE03-A7C0-4F2E-8922-92854FE7A5BF}
{24FEBA95-1FC2-4AC2-8386-6AB13AE87056} = {9B10ADF5-60D1-4EED-9E98-9CB2E1E84E98}
{7015572E-6225-4F32-A00C-4D52280E6C94} = {24FEBA95-1FC2-4AC2-8386-6AB13AE87056}
{CF2BA83A-4CF9-4E29-9128-A7A3D3ADBB35} = {52ACBC5B-D5F0-4FEA-A27B-0A8577204E64}
{5C5403F4-F496-4246-8BEC-E125E1A2BC94} = {CF2BA83A-4CF9-4E29-9128-A7A3D3ADBB35}
{2E13DE8F-0001-4008-A066-B66B4B640915} = {CF2BA83A-4CF9-4E29-9128-A7A3D3ADBB35}
{24B1214E-CFE2-44C0-9B0D-8139C269EED5} = {24FEBA95-1FC2-4AC2-8386-6AB13AE87056}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B99E6BB8-642A-4A68-86DF-69567CBA700A}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ These tools aims to help with cluster management in various dynamic environments
* [`Akka.Discovery.AwsApi`](/src/discovery/aws/Akka.Discovery.AwsApi) - Akka.Cluster bootstrapping discovery service using EC2, ECS, and the AWS API. You can read more in the documentation [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/discovery/aws/Akka.Discovery.AwsApi/README.md).
* [`Akka.Discovery.KubernetesApi`](/src/discovery/kubernetes/Akka.Discovery.KubernetesApi) - Akka.Cluster bootstrapping discovery service using Kubernetes API. You can read more in the documentation [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/discovery/kubernetes/Akka.Discovery.KubernetesApi/README.md).
* [`Akka.Discovery.Azure`](src/discovery/azure/Akka.Discovery.Azure) - Akka.Cluster bootstrapping discovery service using Azure Table Storage. You can read more in the documentation [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/discovery/azure/Akka.Discovery.Azure/README.md).
* [`Akka.Discovery.Dns`](src/discovery/dns/Akka.Discovery.Dns) - Akka.Cluster bootstrapping discovery service using DNS. You can read more in the documentation [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/discovery/dns/Akka.Discovery.Dns/README.md).
* [`Akka.Coordination.KubernetesApi`](https://github.com/akkadotnet/Akka.Management/tree/dev/src/coordination/kubernetes/Akka.Coordination.KubernetesApi) - provides a lease-based distributed lock mechanism backed by [Kubernetes CRD](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) for [Akka.NET Split Brain Resolver](https://getakka.net/articles/clustering/split-brain-resolver.html), [Akka.Cluster.Sharding](https://getakka.net/articles/clustering/cluster-sharding.html), and [Akka.Cluster.Singleton](https://getakka.net/articles/clustering/cluster-singleton.html). Documentation can be read [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/coordination/kubernetes/Akka.Coordination.KubernetesApi/README.md)
* [`Akka.Coordination.Azure`](https://github.com/akkadotnet/Akka.Management/tree/dev/src/coordination/azure/Akka.Coordination.Azure) - provides a lease-based distributed lock mechanism backed by [Microsoft Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview) for [Akka.NET Split Brain Resolver](https://getakka.net/articles/clustering/split-brain-resolver.html), [Akka.Cluster.Sharding](https://getakka.net/articles/clustering/cluster-sharding.html), and [Akka.Cluster.Singleton](https://getakka.net/articles/clustering/cluster-singleton.html). Documentation can be read [here](https://github.com/akkadotnet/Akka.Management/blob/dev/src/coordination/azure/Akka.Coordination.Azure/README.md)

Expand Down
11 changes: 11 additions & 0 deletions src/cluster.bootstrap/examples/discovery/dns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DNS Cluster Bootstrap Example

This example demonstrates how to use DNS-based service discovery with Akka.Management Cluster Bootstrap to form an Akka.NET Cluster.

Three types of records are supported: A, AAAA and SRV.

To run exmample use:
```pwsh
./build.ps1 [a|aaaa|srv]
```
This will build example on your host machine and spawn dedicated docker-compose file for each record type.
21 changes: 21 additions & 0 deletions src/cluster.bootstrap/examples/discovery/dns/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env pwsh

param(
[Parameter(Mandatory=$false)]
[string]$recordType = "srv"
)

if ($recordType -ne "srv" -and $recordType -ne "a" -and $recordType -ne "aaaa") {
Write-Error "Invalid record type. Must be 'srv' or 'a' or 'aaaa'."
exit 1
}
Write-Output "Cleaning up previous containers (ignore errors if containers do not exist)...."
docker-compose -f "$(pwd)/src/docker-compose.srv.yml" down
docker-compose -f "$(pwd)/src/docker-compose.aaaa.yml" down
docker-compose -f "$(pwd)/src/docker-compose.a.yml" down

Write-Output "Building and publishing example..."
dotnet publish --os linux --arch x64 -c Release /t:PublishContainer ./src/DnsCluster.csproj

Write-Output "Start $recordType example"
docker-compose -f "$(pwd)/src/docker-compose.$recordType.yml" up --build
39 changes: 39 additions & 0 deletions src/cluster.bootstrap/examples/discovery/dns/src/DnsCluster.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(TestsNet)</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Akka.Hosting" Version="$(AkkaHostingVersion)" />
<PackageReference Include="Akka.Cluster.Hosting" Version="$(AkkaHostingVersion)" />
<PackageReference Include="Akka.Cluster.Tools" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.DependencyInjection" Version="$(AkkaVersion)" />
<PackageReference Include="Petabridge.Cmd.Cluster" Version="$(PbmVersion)" />
<PackageReference Include="Petabridge.Cmd.Remote" Version="$(PbmVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\..\discovery\dns\Akka.Discovery.Dns\Akka.Discovery.Dns.csproj" />
<ProjectReference Include="..\..\..\..\..\management\Akka.Management\Akka.Management.csproj" />

</ItemGroup>

<ItemGroup>
<Compile Include="..\..\kubernetes\src\KubernetesCluster\Actors\ChaosActor.cs">
<Link>Actors\ChaosActor.cs</Link>
</Compile>
<Compile Include="..\..\kubernetes\src\KubernetesCluster\Actors\ClusterListener.cs">
<Link>Actors\ClusterListener.cs</Link>
</Compile>
<Compile Include="..\..\kubernetes\src\KubernetesCluster\Actors\SubscriberActor.cs">
<Link>Actors\SubscriberActor.cs</Link>
</Compile>
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions src/cluster.bootstrap/examples/discovery/dns/src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0

# Install DNS utilities and diagnostic tools
RUN apt-get update && apt-get install -y \
dnsutils \
iputils-ping \
net-tools \
&& rm -rf /var/lib/apt/lists/*
# Copy published app
COPY bin/Release/net9.0/linux-x64/publish/ /app

# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Configure entry point
# ENTRYPOINT ["dotnet", "/app/DnsCluster.dll"]
ENTRYPOINT ["/entrypoint.sh"]
Loading
Loading