liveBook · Manning

Seed node

As explained in Akka in Action, Second Edition

A seed node is a configured cluster node that provides an initial contact point for joining or starting the cluster.

A seed node is an initial contact point for an Akka cluster. A joining node sends its unique address in a JOIN message, and the Cluster module routes that request to a registered seed node. A seed can be a pure cluster node with no application actors, or it can also run business logic. section 8.2.1

With configured seeds, list each node’s ActorSystem name, host, and port. The first address has a special startup role: it must become Up before the other configured seeds can join. This avoids separately formed clusters while seed nodes are starting. After formation, ordinary nodes join through a seed. section 8.2.1 section 8.2.2

Figure 8.3 Initializing a cluster with seed nodes
CH08_F03_Abraham2

Use the cluster-initialization diagram to distinguish the first seed forming the cluster from later seeds and application nodes joining it. section 8.2.1

Start a three-node local cluster

Configure the cluster actor provider and remote transport, then set seed nodes such as akka://words@127.0.0.1:2551 through ports 2553. Start port 2551 first: it joins itself and forms the cluster. Start 2552 and 2553 afterward; they request to join, enter Joining, and are moved to Up by the leader. Use exact canonical addresses rather than relying on DNS resolution. section 8.2.2 section 8.2.3

Choose one seed-node definition method; do not mix them:

  • Use static configuration for local development or testing, with explicit initial addresses. section 8.2.1
  • Use Cluster Bootstrap to discover nodes automatically in cloud environments including Kubernetes, AWS, Google Cloud, and Azure. section 8.2.1 section 13.1.2
  • Implement programmatic seed-node selection when neither configuration nor bootstrap fits the environment. section 8.2.1

A seed node is not permanently indispensable after cluster formation. If the first seed leaves cleanly, membership changes propagate through gossip and another eligible node becomes leader; the remaining cluster continues to function. If a seed crashes and is marked UNREACHABLE, it cannot rejoin that cluster and must be shut down before being started again. section 8.2.4 section 8.2.5

In a word-counting deployment, one seed, one director, and two aggregators start on separate ports. Role-based minimum-member settings can delay a node becoming Up until enough required members are joining, and a guardian can wait for SelfUp before creating work-dispatching actors. section 8.4.2

How Akka in Action, Second Edition covers it

How deep it goes
Explains configured startup, joining, leadership handoff, and unreachable-node behavior while deferring programmatic seed implementations.
Examples
Demonstrates a three-port REPL cluster and a word-counting deployment with seed, director, and aggregator roles.
What it assumes
Starts from an ActorSystem and configuration, then introduces cluster provider, remoting, and seed-node addresses.
What you can do after
Operate/configure seed-based Akka clusters, start nodes in formation order, and interpret joining, Up, leaving, and unreachable states.
How it connects
Connects seed nodes to Akka Cluster, ActorSystem, cluster membership, leadership, gossip protocol, Cluster Bootstrap, and SelfUp.

Also explained in

Compare how 2 books explain seed node →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Akka in Action, Second Edition. The section links point to the parts of the book it draws on.