Traditional WildFly includes a subsystem for clustering, so that many instances can work together to distribute load. Typically, in a WildFly cluster, each node is homogeneous, serving the same applications.

WildFly Swarm uses the same subsystem but to a different end. With a cluster of WildFly Swarm services, each service may be unique and distinct. Clustering, in tandem with the Topology fraction, serves to assist in discovery of other services.


To enable clustering, the following dependency is required:



The WildFly clustering functionality is built upon JGroups, a reliable group communications stack. By default, it uses IP multicast to locate other members of the cluster. In environments where multicast is not supported, other components may be used.

When using clustering with multicast, JGroups must know which interface to use for multicast packets. By default, your WildFly Swarm application binds to which means all available interfaces. This is ambiguous to JGroups. Therefore, when clustering you must explicitly bind to some non-ambiguous interface. You can do this by setting the swarm.bind.address property through the Maven or Gradle plugins, or via the command-line using -Dswarm.bind.address=w.x.y.z.

Other properties that affect clustering:

Name Description Default


The id of this node in a cluster

<a uuid>


The multicast address that will be used by JGroups