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
3 answers

mod_cluster application for load balancing in JBoss cluster

I have to create a system with JBoss in cluster modality with a load balancer using Apache HTTPD with mod_cluster. I have configured the system correctly, and the load balancer see all nodes of the system. But, I have to create the web application…
0
votes
1 answer

mod_cluster-manager returns blank page

I'm using JBoss AS 7.1 Final with mod_cluster 1.2.0. I've configured HTTPD as follows: http://pastebin.com/C1rnWc1U However when I try to reach the page http://10.0.0.6:10001/mod_cluster-manager/ it returns a blank page:…
0
votes
1 answer

Clustering doesn't work with mod_cluster on JbossAS7 - Stateful Application

I'm going to explain my situation. Background: I'm running three virtual machines with Debian Jessie on Open Nebula, one as master and the other two as slaves. In them i've installed JBoss AS 7.1 and mod_cluster 1.2. Goal: Run a stateful app, so…
ale93p
  • 464
  • 8
  • 20
0
votes
1 answer

How to set up websocket on Apache 2.4.18 and tomcat7?

Currently, I have successfully installed apache2.4.18 which contains the mod_proxy_wstunnel and installed tomcat7 on another machine. And I have deployed atmosphere sample app on tomcat7. Then I can visit…
liam xu
  • 2,892
  • 10
  • 42
  • 65
0
votes
1 answer

issues of mod_cluster & apache & tomcat7 integration

I downloaded mod_cluster native bundles with httpd from http://mod-cluster.jboss.org/mod_cluster/downloads/1-2-6-Final-bin like below. So I did not need to do any configuration for httpd since this tar file contain httpd and related mod_cluster…
liam xu
  • 2,892
  • 10
  • 42
  • 65
0
votes
1 answer

Http doesn't load mod cluster modules

I'm trying to install mod_cluster on JBoss, after some problems with httpd solved in this, now I'm stuck when I try to run "apachectl start", it returns the error: httpd: Syntax error on line 128 of /etc/httpd/conf/httpd.conf: Cannot load…
ale93p
  • 464
  • 8
  • 20
0
votes
1 answer

Apache2 doesn't load mod_cluster modules

I'm working on a debian jessie machine instantiated inside open nebula with kvm. I have to install jboss eap and mod_cluster, so I need to install the apache2 service. I followed the mod_cluster quick start guide and set the…
ale93p
  • 464
  • 8
  • 20
0
votes
1 answer

Compile mod_cluster with httpd 2.4.17 - no rules.mk created

I need to compile for the modules from mod_cluster using https 2.4.17 and I am having an issue compiling the modules. The process fails at the make step. I have successfully build httpd 2.4.17 into and rpm and installed it without issue. I am…
0
votes
1 answer

ModCluster configuration to discard request when load is full

I have a Java application which exposes REST. I have a master and 2 slaves. (jboss7.1.1) Apache-modcluster takes care of load balancing. I have queues maintained in my application which gets filled up at times, when there are no consumers. Hence I…
KurinchiMalar
  • 598
  • 3
  • 12
  • 28
0
votes
1 answer

Apache 2.2.26 + Mod_Cluster Issues

Hoping someone can help here. At the moment I have a JBoss EAP 6.4 setup consisting of a domain controller + host controller. I wanted to put Apache in front of this to test load balancing as eventually this setup will span multiple hosts. I have…
Vira4784
  • 11
  • 4
0
votes
1 answer

Can mod_cluster work with JBoss AS 4.3?

mod-cluster main page specifies JBoss AS 5 as a minimum requirement for mod_cluster. But at the same time on mod-cluster documentation page we can read how to configure JBoss AS 4.3 Is it some kind of documentation mistake? Anyone runs JBoss AS 4.3…
BartBiczBoży
  • 2,512
  • 2
  • 24
  • 33
0
votes
1 answer

wildfly 9.0 standalone cluster with httpd2.4. and mod_cluster1.3.1

I want to set up a standalone Wildfly cluster with 2 nodes. For this purpose I set up 2 fedora22 virtual machines. On both nodes I installed Wildfly 9.0.0.Final and run it with standalone-ha.xml configuration file. On first node I also installed …
Domen Petrič
  • 149
  • 2
  • 10
0
votes
1 answer

mod_cluster removing/adding configured/new node

I have no experience on load balancing softwares and I am a little lost in the documentation and research. What I am looking for is if there is an API for mode_cluster balancer or some programmatic way to remove a configured node or add a new node…
0
votes
1 answer

How to build mod_cluster supporting jboss 7

I am looking for mod_cluster jar to build with jbossAS7 and httpd-2.4.6 on centos 7. I am looking for load balancing but I am not able to find out correct mod_cluster binary or source. Please note that I have already tried out various mod_cluster…
sangita
  • 191
  • 5
  • 14
0
votes
2 answers

Using mod_proxy_cluster and mod_proxy in one VirtualHost of Apache (httpd) configuration

I had the environment with several JBoss and Tomcat servers. They are connected to Apache via modcluster modules (to Apache IP address and port 8090). The Apache contains the configuration: loadbalancer.conf LoadModule slotmem_module…