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

Sticky session not working with multiple apache vhosts and multiple JBoss 7.2 server-groups

Having a specific cluster architecture with the following details: Load balancer (10.10.0.1) using Apache's mod_cluster 1.2.0 without advertising using multicast 2 JBoss AS 7.2 servers (jboss-instance-1, jboss-instance-1) in domain mode (host and…
zfou
  • 891
  • 1
  • 10
  • 33
1
vote
1 answer

Wildfly 8, mod_cluster & apache integration

I am having problems getting mod_cluster 1.2 to work with Apache. I want the configuration to allow Apache to proxy my traffic to the apps server so that myserver.com:9191 (apache) routes traffic to myserver.com:9090 (jboss) Symptoms: When I start…
Marshall
  • 413
  • 1
  • 5
  • 10
1
vote
1 answer

http://localhost/mod_cluster-manager gives page not found error. (File does not exist: mod_cluster-1.2.0/httpd-2.2/htdocs/mod_cluster-manager)

Hi I'm trying to configure mod_cluster with jboss AS 6.1. My clusters are working fine. But I try to view /mod_cluster-manager page it gives me page not found error. Apache is up and running and I see It works! page. Mod_cluster version…
user3022123
  • 47
  • 1
  • 9
1
vote
2 answers

Apache is not getting started after adding mod_proxy_cluster

i am trying to use my HTTP server as load balancer to my Application-server cluster setup. so, i downloaded mod_proxy_cluster binaries and added below files to {$apache-home}/modules directory. mod_proxy.so mod_proxy_ajp.so mod_slotmem.so …
nandu
  • 344
  • 2
  • 11
1
vote
1 answer

Jboss Eap - mod_cluster - to prevent jboss talking to each Other

I have a jboss setup with 2 jboss instances on one VM. Each of the 2 jboss talk to 2 apaches on same VM. Apache 1 apache listen port is 82 Order deny,allow Allow from all …
user2758406
  • 536
  • 7
  • 16
1
vote
1 answer

Requests dispatch to specific JBoss instance in cluster with apache mod_cluster 1.1?

I am trying to implement JBoss AS7 clustered environment with mod_cluster as load-balancer. Can anyone explain how to dispatch requests based on URL params to specific JBoss Node using mod_cluster?
Pand005
  • 1,095
  • 3
  • 23
  • 53
1
vote
1 answer

Session replication on EAP JBOSS 6.0

I am working on Struts 2 framework with EAP Jboss 6. My project session variables were stored and retrieved using 'HTTP Session Map'. When I moved on to the Domain mode of Jboss with Clustering my session values were lost while switching between…
Ram
  • 845
  • 1
  • 13
  • 26
0
votes
0 answers

Apache httpd ignores Location authentication configuration in VirtualHost

I have the following configuration in a config file for httpd: Listen 6666 ServerName server-name LogLevel trace6 LogFormat "%h %p %l %u %t %D \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"…
0
votes
1 answer

Mod Cluster Manger webpage not accessible

I have downloaded latest apache lounge and mod_proxy_cluster_2.0.0Alpha . Added mod_proxy_cluster.conf file to extra folder. Included this conf file in http.conf file and copied *.so files to modules. When i try to access mod_cluster_manager webapp…
0
votes
1 answer

How to restart deployed app when one node in cluster goes down?

I have to restart a deployed app when one node in the cluster(2 nodes Active/Passive) goes down, how do I handle a node failure and then restart the app? I'm using mod_cluster for hot_standby and load balancing.
karolix1279
  • 3
  • 1
  • 1
0
votes
1 answer

Jboss mod_cluster configuration for loadbalancer

I am new to jboss and i am learning how the loadbalancer works in our application. There are two clusters and each server has two eap, from four eap's , two are used for bpm. From domain.xml of jboss eap 6.4 i have this *
0
votes
1 answer

MOD_CLUSTER - remove sticky session

I am using mod_cluster version 1.2.11.Final along with JBoss AS 7.2.0.Final (standalone-ha-full mode) mod_cluster is setup with sticky sessions enabled, we typically have 2 or 3 JBoss servers running at the same time and rotate servers every evening…
DaveB
  • 2,953
  • 7
  • 38
  • 60
0
votes
1 answer

Problems with migrating a system with JBoss EAP 6.3 Standalone + Apache for Wildfly 15 Domain + Apache with modcluster

I'm in the process of migrating a system that uses JBoss EAP 6.3 Standalone + Apache to an environment that uses Wildfly 15 + Apache with modcluster, and I'm having some difficulties to make the system work correctly in this new scenario. After all…
Gian Honório
  • 53
  • 1
  • 11
0
votes
1 answer

Kubernetes: Replace mod_cluster for back end services (reverse proxy)

I am migrating my current service to Kubernetes. Currently back end services are resolved via mod_cluster. mod cluster manager runs on httpd and mod_cluster clients auto register their web contexts with httpd/mod_cluster manager on…
user1843591
  • 1,074
  • 3
  • 17
  • 37
0
votes
1 answer

All static content requests going to Jboss EAP 7.1 , instead of looking in Webserver

Recently, I migrated from Jboss EAP 6.4 to Jboss EAP 7.1. I have a Jboss EWS in front of Jboss EAP, with mod cluster to connect to them. I use some static content which is kept in websever (Jboss EWS). While accessing the webserver URL it used to…