Skip to content

Cluster Membership ​

DSM supports three membership modes so the same runtime API can fit local development, trusted networks, and cloud deployments.

Topology At A Glance ​

Cluster membership topology

Decision Guide ​

EnvironmentRecommended mode
Local development or single-node demo.Standalone
Trusted same-network cluster with multicast support.Multicast
Kubernetes or cloud deployment.Unicast gossip

Standalone ​

Use standalone membership for development and single-node demos.

  • no network discovery required
  • easiest way to validate runtime behavior
  • ideal for the first integration pass

Use this first unless you are explicitly testing cluster behavior.

Multicast ​

Use multicast membership on trusted LAN or VPC networks.

  • automatic peer discovery on a shared network
  • simple configuration model
  • useful where multicast is supported and allowed

Default multicast settings in Spring properties:

  • group: 239.0.77.1
  • port: 4446
  • heartbeat interval: 1s
  • failure threshold: 5

Unicast Gossip ​

Use unicast gossip in Kubernetes and cloud environments.

  • explicit seed nodes
  • configurable gossip fanout and interval
  • optional DNS seed discovery

Default unicast settings in Spring properties:

  • gossip port: 4447
  • gossip interval: 1s
  • gossip fanout: 3
  • failure threshold: 5
  • suspicion enabled: true
  • suspicion quorum: 3
  • suspicion timeout: derived from gossipInterval * failureThreshold * 2
  • DNS port: 9090

Concrete example:

yaml
dsm:
	cluster:
		mode: unicast
		unicast:
			gossip-port: 4447
			gossip-interval: 1s
			gossip-fanout: 3
			suspicion-enabled: true
			suspicion-quorum: 3
			seed-nodes:
				- 10.0.1.20:4447
				- 10.0.1.21:4447

Bootstrap flow: a new node contacts one configured seed, learns additional peers from gossip state, joins the cluster view, and then begins normal replication traffic.

Suspicion Stage ​

Unicast gossip uses a SWIM-style SUSPECT stage before declaring a peer FAILED by default.

SWIM suspicion state

Only direct gossip from the suspected peer clears suspicion. Third-party advertisements do not. The reporter set is bounded at 32 reporters to prevent unbounded memory growth in large clusters.

Spring Property Model ​

Cluster mode is configured under dsm.cluster.mode.

Unicast-specific settings live under dsm.cluster.unicast.*, including:

  • seed-nodes
  • gossip-port
  • gossip-interval
  • gossip-fanout
  • failure-threshold
  • suspicion-enabled
  • suspicion-quorum
  • suspicion-timeout

Multicast settings live under dsm.cluster.multicast.*, including group, port, heartbeat interval, and failure threshold.

Node identity defaults also matter:

  • dsm.node.id defaults to a random UUID
  • dsm.node.host defaults to the resolved local host address
  • dsm.node.port defaults to 9090

If you are running a real multi-node environment, make node identity explicit rather than relying on defaults.

Isolation Boundary ​

Membership is always scoped by both clusterId and serviceId. If those do not match, nodes should not participate in the same DSM fabric.

Boundary checkRuntime result
Same clusterId and same serviceId.Nodes may join the same DSM fabric.
Same clusterId and different serviceId.Membership or replication traffic is rejected or ignored.
Different clusterId.Nodes belong to separate DSM fabrics.