WildFly Managed Domain

Automatic WildFly Clustering in Managed Domain Mode

WildFly Managed Domain mode provides centralized management for multiple WildFly servers. With Auto-Clustering and horizontal scaling, a standalone WildFly server can be transformed into a managed-domain cluster running inside containers with minimal manual configuration.

WildFly Managed Domain in containers - auto clustering and scaling
WildFly Managed Domain with automated clustering and scaling.

Why Managed Domain Mode?

A standalone WildFly server is administered independently. In Managed Domain mode, multiple WildFly instances share centralized management through a Domain Controller. This makes it suitable for multi-server production environments and advanced development scenarios where several application-server instances must be managed together.

Centralized ManagementManage multiple WildFly servers from a single Domain Controller.
Distributed DeploymentDeploy an application once and distribute it to managed server instances.
High AvailabilityRun the application on several worker nodes so individual node failures do not stop the whole service.
Elastic ScalingAdd or remove worker containers according to workload requirements.

Managed Domain Topology

A traditional WildFly Managed Domain contains several Java processes. Understanding their roles is important when moving this topology from virtual machines to containers.

Worker Server (WS)The JVM process where Jakarta EE applications are deployed and incoming requests are processed.
Host Controller (HC)Configures worker servers and synchronizes them with the Domain Controller.
Process Controller (PC)Controls the lifecycle of worker servers, including start, stop and restart operations.
Domain Controller (DC)The primary management process that provides centralized administration for the whole managed domain.

Running Managed Domain in Containers

The managed-domain architecture requires several Java processes in each host. System containers are well suited to this model because they can safely run multiple processes in one isolated container while remaining considerably lighter than a traditional virtual machine.

For a scalable topology, one Worker Server is placed in each worker container. A worker container typically runs Worker Server, Host Controller and Process Controller processes. A separate management container runs the Domain Controller and Process Controller.

One worker per container

Keeping one Worker Server in each worker container makes vertical resource scaling and horizontal container scaling much easier to manage.

Create Standalone WildFly

  1. Open the environment topology wizard.
  2. Select the required WildFly version.
  3. Set the vertical resource limits.
  4. Enter the environment name.
  5. Create the environment.
  6. Deploy the application to the new standalone WildFly node.
  7. Open the application in a browser and verify that it is running correctly.

At this stage the environment contains a standalone WildFly instance. The application can be deployed and tested before converting the environment into a managed-domain cluster.

Enable Auto-Clustering

Auto-Clustering converts the WildFly application-server layer from standalone operation to Managed Domain mode. The platform automatically interconnects the required components and adds the Domain Controller and load-balancing components where needed.

  1. Open Change Environment Topology.
  2. Select the WildFly application-server layer.
  3. Enable Auto-Clustering.
  4. Add additional WildFly nodes in the Horizontal Scaling section.
  5. Apply the topology changes.
!

Initial conversion downtime

When an existing standalone environment is converted to Managed Domain mode, a short interruption can occur during the first transformation. If Auto-Clustering is enabled from the beginning with multiple instances, the environment starts directly in domain mode.

Manual and Automatic Scaling

Manual Scaling

Add or remove worker nodes through the topology wizard. New WildFly nodes automatically join the Managed Domain cluster.

Automatic Scaling

Configure automatic horizontal scaling triggers from the environment settings. Triggers can add or remove worker nodes when resource consumption exceeds or falls below defined thresholds.

CPU TriggerScale according to processor utilization.
Memory TriggerScale according to RAM consumption.
Network TriggerScale according to network activity when supported.
Scale In / OutDefine how many nodes should be added or removed when a trigger is activated.

After scaling, new instances are added to the Managed Domain automatically. Applications deployed previously are distributed to new WildFly workers, and supported server configuration changes are synchronized across the application-server layer.

Application Availability Across Workers

Applications deployed before clustering are propagated to the worker servers during transformation. Each worker can serve the application, allowing the load-balancing layer to route requests between active instances.

  1. Open the application through the cluster entry point.
  2. Confirm that the application is available on multiple worker nodes.
  3. Restart one worker node.
  4. Continue accessing the application through the main environment URL.
  5. Verify that another available worker continues serving requests.

High-availability test

Restarting an individual worker is a practical way to verify that the application remains available through the remaining members of the cluster.

Clone the Managed-Domain Cluster

Cloning is useful for testing a new release or configuration without modifying the production cluster. The clone includes the Managed Domain topology, worker nodes and deployed application.

  1. Select the clustered WildFly environment.
  2. Choose Clone Environment.
  3. Enter a name for the cloned environment.
  4. Wait for the new cluster to be provisioned.
  5. Verify application code and configuration for any hard-coded IP addresses or domain names.
  6. Apply and test the planned application changes on the clone.

The cloned Domain Controller manages the cloned worker nodes separately, allowing development and release testing to proceed without affecting the original environment.

Expected Result

The standalone WildFly environment becomes a scalable Managed Domain cluster with centralized administration, multiple worker containers and load balancing. Additional workers can be added manually or automatically, while application deployments and supported configuration changes are synchronized across the cluster.

Important Notes

  • Use Managed Domain mode when centralized administration of multiple WildFly instances is required.
  • Auto-Clustering reduces the manual configuration needed when converting a standalone environment into a cluster.
  • The initial standalone-to-domain transformation may cause a short service interruption.
  • Subsequent horizontal scaling can be performed without the same conversion downtime.
  • Review hard-coded IP addresses and domains before using a cloned environment.
  • Test failover and scaling behavior before using the cluster for production workloads.