Skip to content

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Jun 9, 2025

Running Clustered Nodes on a Single Machine

When developing or testing, you may need to run multiple Akka.NET nodes on the same host. Manually assigning distinct remote port for each process can work for a fixed seed-node strategy, but doing so for management ports would not work with Akka.Discovery and Akka.Management.Cluster.Bootstrap.

Cluster.Bootstrap expects that all hosts have the same management port. When Akka.Discovery returns a list of open ports on a host, the bootstrap coordinator will filter out any ports that are different from the locally configured management port, ignoring the rest.

To allow each host to advertise its own management port without filtering each other out, disable fallback-port filtering:

builder.WithClusterBootstrap(setup =>
{
    setup.ContactPoint.FilterOnFallbackPort = false;
});
akka.management {
  cluster.bootstrap {
    contact-point {
      # allow discovery to return multiple ports per host
      filter-on-fallback-port = false 
    }
  }
}

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar fixes

@Aaronontheweb Aaronontheweb self-requested a review June 9, 2025 17:47
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 9, 2025 17:48
@Aaronontheweb Aaronontheweb merged commit 82b91de into akkadotnet:dev Jun 9, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants