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
0
votes
0 answers

Wildfly 10 getting a NullPointerException while running in domain mode

I have configured Wildfly 10 in domain mode. All configuration of Apache HTTP Sever and mode_cluster are done. There are 2 hosts. One is master and other is slave. There are total 4 instances of Wildfly on both hosts, 2 on each hosts. While…
0
votes
1 answer

Wildfly10 mod_cluster multiple port clustering. 404 on call context

I have configured wildfly to listen on different ports for webservices and jfs-pages. Maven jsf module jboss-web.xml: client-web-application client-web-application Maven webservice…
Michal M.
  • 31
  • 1
  • 1
  • 3
0
votes
1 answer

Mod cluster configuring sticky session attribute name

Is it possible to configure the sticky session attribute name in mod-cluster? I need to use a name different to JSESSIONID. I´ve tried ProxyPass / balancer://xxxxx/ stickysession=TESTSESSIONID|testsessionid ProxyPassReverse / balancer://xxxxx/ but…
leaqui
  • 533
  • 6
  • 22
0
votes
1 answer

Apache mod_cluster disabling connection to nodes

My setup is an Apache Httpd 2.4 server in front of 4 Wildfly 10.1 server nodes. I'm using mod_cluster for load balancing and everything is running fine most of the time. But several times each day, this appears in Apache's error log: [Wed Mar 15…
Bjørn Stenfeldt
  • 1,432
  • 1
  • 18
  • 25
0
votes
2 answers

Sticky session duration

is it possible to specify the sticky session duration in mod_cluster? I mean that the stuck session is cleared when there isn't activity for a period of time. We have a distributable application that keeps a reference to logged user in the web…
leaqui
  • 533
  • 6
  • 22
0
votes
0 answers

JBoss 7.1.1 + mod_cluster : Session replication - Can't find resource org.jboss.as.web.session.LocalStrings

I am running JBoss 7.1.1 instances and httpd + mod_cluster in the standalone mode Machine1: JBoss 7.1.1 , Apache httpd + mod_cluster (windows 7) Machine2 : JBoss 7.1.1 (windows 7) I am starting the nodes in with the below command standalone -c…
0
votes
0 answers

ModCluster not working with wildfly 9

Wildfly not working with mod cluster below is the error_log [Wed Jan 25 16:53:55.860419 2017] [core:error] [pid 4980:tid 1088] [client 192.168.1.10:64522] AH00135: Invalid method in request bela\x19\x84\x04 [Wed Jan 25 16:54:11.387227 2017]…
Haider
  • 615
  • 1
  • 16
  • 38
0
votes
1 answer

Wildfly/Jboss Docker Cluster using Docker-compose

I am new to Wildly and Docker I am trying to build a test cluster of wildfly. I am using docker compose for orchestration. Following is my docker-compose.yml file node: image: wildfly-mgmt links: - lb:lb lb: image:…
Dutta
  • 663
  • 2
  • 11
  • 30
0
votes
1 answer

mod_cluster widfly 9 and client certificate 2 way SSL

I have one problem when i am configuring 2 way SSL (client certificate) with mod_cluster on wildfly 9.0.2 -Direct connection on wildfly on port 8443 (like https://wildflyserver:8443/context) is working, -AJP connector connection between apache and…
cyril
  • 872
  • 6
  • 29
0
votes
1 answer

how to do mod_cluster or mod_jk cluster for jboss eap 6.1

I have two jboss node in same machine with different port and I installed apache server and configured the mod_cluster in apache/conf/httpd.conf as below: Order deny,allow Allow from all
0
votes
1 answer

Full Httpd bundled with Mod Cluster does not work - libpcre.so.1 error

Playing around with Mod Cluster and following the documentation at http://docs.jboss.org/mod_cluster/1.3.0/html_single/#Quick_Start_Guide Following section 2.6 I started my httpd /opt/jboss/httpd/sbin/apachectl start The httpd was from the FULL…
user3808203
  • 153
  • 2
  • 12
0
votes
1 answer

Multiple load balancers Tomcat is it Viable?

Question: Could HAProxy and Mod_Cluster and Tomcat be used together ? Either Mod_Cluster+Tomcat or HAProxy+Tomcat but not HAProxy+Mod_Cluster+Tomcat unless we are setting up multiple load balancer correct?
user3808203
  • 153
  • 2
  • 12
0
votes
1 answer

using one dns (domain) for mutilple web applications

I have many jenkins instances each one is installed in a different server and using a different port to distinguish them (one for test, one for uat and the other for prd), Is it possible to setup an alias (dns), and each time someone hit the url he…
askeriam
  • 3
  • 3
0
votes
2 answers

how to identify the thread which is causing JVM CPU utilization is reaching to 90 to 100% in Jboss java application?

Our java application(ear) was deployed in J Boss+Linux and We are using mod clusters and have total 8 JV M's or j Boss instances. We could see that daily one or two of JV M's CPU utilization is reaching to 100% and making application is very slow. I…
suresh
  • 3
  • 1
  • 8
0
votes
1 answer

Jboss org.jgroups.protocols.pbcast.NAKACK issue

[org.jgroups.protocols.pbcast.NAKACK] (requester=, local_addr=) message ::port not found in retransmission table of :port: (size=xxxx, missing=x, highest stability=xxxxx)]
suresh
  • 3
  • 1
  • 8