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
1
vote
1 answer

Problem rewrite url apache to nodeJS with mod_cluster willdfly

I have apache with mod_cluster for wildfly cluster I have one virtualhost on 443 I have a nodeJS on 8443 on same server apache I want to redirect server/api to server:8443 (nodejs) NODEJS and apache are on same server (apache 443 ,nodejs…
cyril
  • 872
  • 6
  • 29
1
vote
1 answer

Sticky session in mod_cluster 1.3.0 + jboss 6.3.3

I have a setup with 1 mod_cluster (1.3.0) and 2 JBoss (6.3.3). I am trying to use stickysession but I cannot see the cookie in the response and the requests are being served by different nodes. Using default mod_cluster config (with my IP)
mkcons
  • 155
  • 1
  • 8
1
vote
1 answer

How to configure same context applications to use different machines with ModCluster and Wildfly10

I'm trying to use ModCluster to load balance some servers. We have one single EAR that need to be load balanced by different DNSs. We have this scenario. We need to maintain the same context 'system1' because of backward compatibility 4 servers for…
1
vote
1 answer

Wildfly 10 Add Load Balancer to existing domain

I have no prior experience with Wildfly or JBOSS before implementing this scenario. I have Wildfly 10 running in Domain mode. 2 hosts each running 1 wildfly server connected to a single datasource. Server1 -Master- Domain Controller Server2 -…
1
vote
1 answer

Connecting apache and Widfly using mod_cluster

I am trying to setup mod_cluster as a reverse proxy for Wildfly 9. When I use http as a protocol (between mod_cluster and Wildfly), everything works just fine (forwarding requests to application server and detecting server). My problems come up…
Ammaro
  • 370
  • 2
  • 14
1
vote
2 answers

JBOSS EAP6.4 and mod_cluster

I want to set up clustering and fail-over system with one apache httpd and two JBOSS EAP 6.4. download mod_cluster download http://mod-cluster.jboss.org/mod_cluster/downloads/1-1-3 jboss eap 6.4…
monad.gon
  • 917
  • 7
  • 12
1
vote
0 answers

Wildfly 10 session replication fails in domain mode

I followed instructions which is given at https://docs.jboss.org/author/display/WFLY10/Clustering+and+Domain+Setup+Walkthrough I used mod_cluster 1.2.6 and wildfly 10. Slave node registers to master domain controller. Load balancing is working as…
fatih
  • 105
  • 9
1
vote
1 answer

WildFly 9 load balancing with mod_cluster

I'm trying to configure load balancing with jboss wildfly running on windows for the first time. I d'ont have an experience with jboss or apache httpd. i have installed apache httpd and mod_cluster, than i added the required modules from mod_cluster…
elpazio
  • 697
  • 2
  • 9
  • 25
1
vote
0 answers

Setup multiple mod_clusters on same server

I have 2 servers on which I want to setup a clusterized environment like describe in the diagram bellow. Basically I have a single web application that need to be deployed multiple times, once for every one of our clients. My idea is to create a…
felipe_gdr
  • 1,088
  • 2
  • 11
  • 27
1
vote
2 answers

Wildfly 10 not load balancing to other host

I followed these instructions from Stuart Douglas video to enable Wildfly to balance request without the need of apache + mod_cluster, feature that is available since Wildfly 9. It worked like in the video. But then, instead of adding the 3rd…
1
vote
1 answer

Prevent jboss application server from getting picked up by load balancer?

There are two mod cluster load balancers running in my network and I want to exclude one from picking up my jboss application server nodes. I want the nodes to be served exclusively by one of the balancers. How do I achieve this?
Mars
  • 4,677
  • 8
  • 43
  • 65
1
vote
2 answers

JBoss Clustered Application Freezes and Apache mod_cluster config has some warnings

I have my JBoss Application in cluster. When I start my domain.sh in all the nodes and run the application. My Application freezes even for normal db transactions from App. When I observed my Apache I'm getting some warnings. Is this warnings are…
Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
1
vote
0 answers

tomcat7 hot-standby Node with mod-cluster and Apache HTTPD2.2

I'm using tomcat7.0.63 with mod-cluster1.2.9 and Apache HTTPD2.2 on RHEL6.7 Multiple Tomcat-instances with dedicated balancer configurations are sharing the Apache HTTPD using dedicated Virtualhost:6666. Only one Tomcat instance should have a…
hplar
  • 11
  • 1
1
vote
3 answers

Websocket issue on wildfly cluster

I am using richfaces a4j:push in my Spring-JSF integrated application. I am able to push messages to the browser using websocket in my non cluster environment on wildfly 8.0.0. When I deploy the application on wildfly8.0.0 on redhat enterprise 7.0…
Sam
  • 554
  • 1
  • 12
  • 23
1
vote
2 answers

Wildfly cluster and Apache2

I browse a lot, I see this question is similar to other already posted but solutions seem not working in my case. I built a Wildfly.8.2.0.Final cluster and I want to put it behind httpd, cluster is running correctly. On my host I run three Debian…
Francesco
  • 1,742
  • 5
  • 44
  • 78