Questions tagged [mod-cluster]

Mod_cluster is a dynamically configured load balancer implemented for Apache HTTP Server, Undertow and Nginx. It has worker-side libraries for all Tomcat 6+, JBoss AS 5+ and Wildfly servers. It is a JBoss community project.

Mod_cluster uses a communication channel to forward requests from balancer to worker nodes and another channel to receive load and application lifecycle events from worker nodes.

Balancer

Mod_cluster load balancing logic is implemented in a set of Apache HTTP Server modules, in a suite of modules for Nginx and last but not least, as a part of Undertow web server; usable both as Undertow standalone and as a Wildfly server. All these projects are striving to maintain protocol compatibility.

Worker

Mod_cluster, unlike other proxies such as mod_proxy or mod_jk, uses worker-side libraries that tap into servlet containers life cycles. These libraries are implemented for Tomcat 6+, JBoss AS 5+ and Wildfly. One could have a Wildfly balancer with Wildfly workers, Apache HTTP Server balancer with Wildfly or Tomcat workers etc.

Communication channel

Mod_cluster workers are either configured with Mod_cluster balancer address or they listen to UDP multicast advertising of Mod_cluster balancer where they learn the address and port of Mod_cluster balancer.

Worker nodes proceed on registering themselves with the balancer by sending custom HTTP methods messages, telling the balancer where to contact them, i.e. worker's addresses and ports, and most importantly, which web application contexts they have deployed. Workers periodically send information about their current load or lifecycle events, e.g. re-deployment, shutting down etc.

Balancer sends client's requests to worker nodes and processes replies. It only addresses a worker node if the worker node responds to a special "ping" on application layer. It means that it is not enough for the balancer that the TCP connection to worker is open, it actively ascertains that the worker is really processing requests.

From balancer to workers

Mod_cluster balancer offers these protocols for sending requests to worker nodes: AJP, HTTP, HTTPS, WS/WSS (Apache HTTP Server and Undertow implementations), HTTP/2 (Undertow implementation).

From workers to balancer

Mod_cluster management messages use either HTTP, HTTPS or HTTP/2.

Why mod_cluster

Mod_cluster provides quite a few distinct advantages over mod_jk or mod_proxy:

  • Improved load balancing between worker nodes since the load metric is calculated directly by the worker node instead of the load balancer
  • Mod_cluster is aware of the lifecyle of applications in the application server so it knows when an application gets deployed or undeployed
  • It supports all mainstream protocols - AJP, HTTP, HTTPS, WS/WSS, HTTP/2, unlike mod_jk which only supports AJP
  • It uses advertisement of balancers location so workers could find it without any static configuration. It makes it very easy especially in a cloud environment to automatically add or remove nodes based on the load factor

More information can be found on the mod_cluster community page http://modcluster.io.

91 questions
12
votes
1 answer

apache + mod_cluster + wildfly on Ubuntu

I'm trying to get the following setup working: apache 2.4 + mod_cluster 1.3 Final + ubuntu 14.04.2-server + Wildfly 8.1.0 Final and I'm successfully advertising the wildfly context to apache, but when I try to hit the load balancer I get a…
PTBG
  • 585
  • 2
  • 20
  • 46
5
votes
1 answer

Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7

I am certifying my application on JBoss EAP 7. My application works on standalone mode but in cluster mode, my application gets deployed but I am unable to login. I am again re-routed to login url. I have setup cluster using mod_cluster. There is no…
5
votes
1 answer

I can not get session replication to work with wildfly 10

We have put httpd as a load balancer in front wildfly. I am using wildfly 10.1.0. I have 3 machines, one master and two slaves. In my domain.xml of the master I have:
O. Bennis
  • 51
  • 1
  • 6
5
votes
3 answers

Wildfly 9 - mod_cluster on TCP

We are currently testing to move from Wildfly 8.2.0 to Wildfly 9.0.0.CR1 (or CR2 built from snapshot). The system is a cluster using mod_cluster and is running on VPS what in fact prevents it from using multicast. On 8.2.0 we have been using the…
TomS
  • 1,159
  • 2
  • 17
  • 35
4
votes
2 answers

Jboss Mod_cluster

I have a jboss cluster with 2 nodes (a and b) + 1 apache working as mod_cluster (apache in a separate server) If one of the nodeA goes down, mod cluster can't connect to another one. So, if nodeA crashes, I can't access jboss aplication by…
Joao Vitorino
  • 2,976
  • 3
  • 26
  • 55
4
votes
1 answer

Wildfly 9 Load-Balancing

I have two Wildfly 9 nodes running in standalone mode. 192.168.1.34 - node1 - Listening on 8080 192.168.1.35 - node2 - Listening on 8080 192.168.1.33 - myserver - Listening on 8080 I want to load-balance between the two nodes so that requests…
Ken J
  • 4,312
  • 12
  • 50
  • 86
3
votes
4 answers

wildfly 10 in domain mode + apache2 on ubuntu + mod_cluster

I'm trying to get the following setup working: OS: Ubuntu 14.04.3 LTS Apache2: Apache/2.4.7 (Ubuntu) mod_cluster 1.3.1 wildfly: wildfly-10.0.0.CR2 domain mode (server-one in main-server-group and server-two in other-server-group on same ubuntu…
3
votes
3 answers

403 when trying to access /mod_cluster-manager?

I'm running CentOS 7 with Apache 2.4.6. I'm trying to create a Wildfly/JBoss cluster using mod_cluster 1.2.6. I've successfully accomplished this on Mac OSX, and am just trying to get it up and running in our server environment. My cluster and…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
3
votes
2 answers

modcluster (Wildfly) is not detecting Advertize from Apache

I am trying to configure WildFly 8.1.0 with mod_cluster. Both WildFly and Apache are running on the same machine. The machine is Ubuntu 12.04 with Apache 2.2.x Apache is set up correctly (I believe). I have tested that the advertise module is…
Chris Ritchie
  • 4,749
  • 2
  • 36
  • 33
2
votes
1 answer

Root Context on EAP not getting registered in MOD_CLUSTER

I have setup two EAP instances in standalone-ha mode running as cluster. I have also deployed an applicaiton with default / context (ROOT context) on both the nodes I also setup Apache MOD_CLUSTER listening on 1994 port. I am able to access the…
Vikram
  • 635
  • 1
  • 9
  • 29
2
votes
0 answers

AWS EC2 with S3 PING Wildfly 8.2 session not shared

The two wildfly instances are not in the same session. I have configured the following parts of the standalone-full-ha.xml :
Laura Liparulo
  • 2,849
  • 26
  • 27
2
votes
1 answer

Load balancing in JBoss with mod_cluster

Got a general question about load balancing setup in JBoss (7.1.1.Final). I'm trying to setup a clustered JBoss instance with a master and slave node and I'm using the demo app here (https://docs.jboss.org/author/display/AS72/AS7+Cluster+Howto) to…
ssloan
  • 2,226
  • 4
  • 26
  • 40
1
vote
0 answers

manager_handler STATUS error: MEM: Can't read node with "master:server1" JVMRoute

I have setup mod cluster 2.0.0 with JBOSS EAP 7.3 . The nodes are getting registered with cluster manager but i am not able to access webapps through mod_cluster . It throws service unavailable error. When i checked httpd error log t says…
1
vote
0 answers

Mod_cluster + apache + wildfly via http

I have a problem with configuring apache 2.4.10 + mod_cluster 1.3.1 + wildfly 17 - Segmentation fault in error.log in apache. When I use ajp it works fine, but not http. I tried to compile and used modules 1.3.12 version of mod_cluster but it didn't…
1
vote
1 answer

Mod_Cluster LifecycleListeners Spring Boot

I'm migrating my project Spring to Spring Boot. But I'm faced with a problem, we have a reverse proxy using apache2 and mod_cluster. In actual version we declare a Listerner in the server.xml.
1
2 3 4 5 6 7