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

Url rewriting in Apache HTTPD with mod_cluster

I am new to Apache. I have 2 jboss (Jboss as 7.1.1) and apache httpd server. I am using mod_cluster for load balancing. I wish to hide the jboss url from user and wish to show the user clean urls. for e.g. www.mydomain.com will be having my static…
mandar
  • 35
  • 1
  • 12
0
votes
1 answer

mod_slotmem.so: undefined symbol: apr_shm_remove

I am trying to create a jboss cluster as mentioned in the link below.. [https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto][1] I was able to complete upto the installation of apache httpd. But, faced a error when i tried to load the…
Daniccan
  • 2,755
  • 1
  • 18
  • 27
0
votes
1 answer

How to configure mod_cluster with JBoss EAP 6 while it is running in domain mode?

If application server instances reside on different machines ? I mainly want to know the configurations guide on the jboss eap server side.
liam xu
  • 2,892
  • 10
  • 42
  • 65
0
votes
1 answer

Custom load balancing algorithm with mod_cluster

I have recently found out that mod_cluster offers more capabilities than mod_proxy or similiar modules. Hence there are dynamic deployment and new metrics available for the load balancing I have a question if there is a possibility to write own load…
Tomek
  • 3
  • 2
0
votes
1 answer

Apache Modcluster failed to drain active sessions

I'm am using JBoss EAP 6.2 as Webapplication server and Apace Modcluster for load balancing. Whenever I try to undeploy my webapplication, I get the following warning 14:22:16,318 WARN [org.jboss.modcluster] (ServerService Thread Pool -- 136)…
Adheep
  • 1,585
  • 1
  • 14
  • 27
0
votes
1 answer

while stress test, all requests goes to only 1 node

kindly i need someone to help me in weird issue i am facing. i am deploying a web application on Jboss eap 6. i configured two JBoss nodes over the same machine ( server 1 - server 2 ) and configured them to become cluster environment. also i…
0
votes
1 answer

Clustering (Apache 2.2.25 mod_jk + JBoss EAP 6.2) with Session Replication OFF and stickiness ON does not work

I am using JBoss EAP 6.2 and Apache 2.2.25-no-ssl for load balancing and clustering deployment of my application. I want Session Replication off and Sticky session on. But after doing all sort of configurations, what I noticed that my load balancer…
Ketan
  • 2,612
  • 5
  • 31
  • 44
0
votes
1 answer

Customize JSessionID generated by JBoss

Can we customize the JSESSIONIDs that JBoss generates (adjust the generated value, append certain unique strings to it, etc.)? TIA Regards, Chandu
chandu
  • 403
  • 1
  • 6
  • 15
0
votes
4 answers

Error MEM sending STATUS command to , configuration will be reset: MEM: Can't read node

I'm trying to implement Wildfly 8.1.0.Final domain setup, profile full-ha, with 1 master and 2 slaves with load balancing by mod_cluster. My environment: 1) host master on VPS (DigitalOCean) Ubuntu 14.04 LTS x64, Wildfly 8.1.0.Final and Apache Web…
cviniciusm
  • 139
  • 1
  • 2
  • 13
0
votes
1 answer

Jboss7 Cluster issue with Apache web server

I want to cluster my web application in jboss 7. for this I am using Apache webserver in front of Jboss7 and am using mod_cluster. Below is my configuration for in httpd.conf `LoadModule authz_host_module modules/mod_authz_host.so LoadModule…
0
votes
1 answer

Jboss clustering: mod_cluster mod_cluster_proxy.so causing apache to crash

I am trying create a cluster of JBoss AS 7.1.1 (two instances in one machine with port offset as 100) in standalone mode. I am using apache (ver 2.2.22) with mod_cluster(ver 1.2.0) for load balancing. When I bring up both JBoss I could see the…
0
votes
2 answers

mod_cluster not balancing load after discover

I have cluster setup up and running ...Jboss 7.1.1.Final and mod_cluster mod_cluster-1.2.6.Final. mod_cluster load balancing is happening bitween two nodes - nodeA nodeB. But when I stop one node and start, mod_cluster still sends the all load to…
Shak
  • 177
  • 1
  • 3
  • 18
0
votes
1 answer

JBoss clustering overwrite some folder

I have JBoss clustring in use with Apache mod_cluster clustering. The modcluster configuration is the basic: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule slotmem_module…
drodil
  • 2,292
  • 1
  • 22
  • 37
0
votes
1 answer

command for enabling/disabling app context in mod cluster?

Can anyone provide me a command to enable /disable context in mod cluster-1.0.10? I have this curl http://mydomain/mod_cluster-manager?Cmd=STOP-APP&Range=CONTEXT&JVMRoute=node1& Alias=default-host&Context=/myapp but i am unable to understand…
krish3
  • 85
  • 1
  • 1
  • 8
0
votes
1 answer

dEAP Jboss 6 Mod Cluster configuration

I'm setting up a cluster on EAP JBoss 6.0.1 with domain mode. The Master server is in ubuntu and one slave in another ubuntu and one slave in windows server. How to install and configure Apache mod cluster on ubuntu server properly? And also how to…
Ram
  • 845
  • 1
  • 13
  • 26