JBoss Clustering a Web Application

This article discusses the required steps to cluster a Web application using WildFly application server and the older server releases (JBoss AS 5). Clustering allows us to run an applications on several parallel servers (a.k.a cluster nodes). The load is distributed across different servers, and even if any of the servers fails, the application is … Read more

How to monitor and invalidate HTTP Sessions in WildFly

This article has been updated to show how to monitor and invalidate HTTP Sessions in WildFly application server / JBoss EAP using management instruments. First of all, in order to gather statistics about HTTP sessions, you need to enable statistics on undertow subsystem You can do it from the CLI as follows: /subsystem=undertow:write-attribute(name=statistics-enabled,value=true) That being … Read more

Configuring WildFly as Load Balancer for a Cluster

This tutorial is about Load Balancing a cluster of WildFly servers using a WildFly front-end server configured using the load-balancer profile. Since WildFly 9, you can use an instance of the Application Server as a mod_cluster front-end for your back-end applications. This removes the need to use a native Web server like Apache (and mod_cluster … Read more

How do I change multicast address of JBoss cluster ?

There are different options to change the default multicast address depending on the version of JBoss / WildFly which you are using. Changing the multicast address in WildFly In WildFly the System Property which controls the default multicast address is jboss.default.multicast.address and defaults to 230.0.0.4 <socket-binding name=”jgroups-udp” interface=”private” port=”55200″ multicast-address=”${jboss.default.multicast.address:230.0.0.4}” multicast-port=”45688″/> Therefore, you can change … Read more

Clustering EJB 3 with JBoss AS

Please note: This tutorial has been written for JBoss EAP 5/6 and early versions of WildFly. The current version of WildFly or JBoss EAP 7 no longer requires you to enable the clustering behavior. By default, if the server is started using the “ha” or “full-ha”, the state of SFSBs will be replicated automatically and … Read more

How to configure Load Balancing Groups in WildFly

In this tutorial we will learn how to configure Load Balancing Groups with mod_cluster so that requests for your applications are not spread randomly across the full WildFly cluster. Application requests will be sent first to other nodes available in a given Balancing Group before it is sent to another Load Balancing Group. Our starting … Read more

WildFly Configuring HTTP Session in a cluster

This tutorial discusses in detail how to configure HTTP Session Management in clustered Web applications, based on the new changes introduced in WildFly 17. Web applications which are running in a cluster-aware configuration (“ha” or “full-ha” profile) can survive the lifespan of a single server by adding the element into the web.xml file. Example: <web-app … Read more

Configuring Ranked Load Balancing in WildFly

One of the new features included in WildFly 18 is the ability to load balance requests using a ranked order of preference. The default session affinity algorithm in a WilFly cluster is set by the “affinity” attribute: /subsystem=undertow/configuration=filter/mod-cluster=load-balancer:read-resource() { “outcome” => “success”, “result” => { “advertise-frequency” => 10000, . . . . “affinity” => {“single” … Read more

Configuring High Availability with WildFly

High Availability in WildFly serves the purpose to guarantee the availability of Java EE application. As the number of request for an application increase, there are two potential issues: Failure of the application, if the only node where it runs crashes. Delays in serving requests, if the server is unable to handle the load. In … Read more