Mod cluster Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 34: Line 34:


<font color=red>TODO</font>
<font color=red>TODO</font>
=Manager=
The mod_cluster manager runs inside a virtual host. The manager is available over HTTP at http://<virtual-host-ip-address>:<virtual-host-port>/mod_cluster-manager


=Balancer=
=Balancer=

Revision as of 05:22, 9 January 2016

Internal

Architecture

mod_cluster general idea is that the httpd process instantiates balancers, which are mechanism capable of sending requests into a set of back end nodes. Each balancer has a set of worker nodes, each worker node corresponding to a back end node. The node population associated with a balancer is dynamic - explain that. Virtual hosts work with balancers: a virtual host has the capability to either send requests into one or more balancers, based, which in turn send the requests into their node population, or serves the request locally from its DocumentRoot. The balancers are dynamically updated with contexts over the network.


Questions:


  • Is the top level balancer common to all virtual hosts while one declared inside a proxy is private to that proxy? Try to use a balancer declared in VH1 from VH2.
  • Clarify the relationship between balancer and virtual host.
  • Understand how a back end node dynamically updates its own context on the front-end. This makes ProxyPass superfluous.

httpd multicasts itself as soon as it starts. JBoss mod_cluster service listens to proxy advertisements:

21:08:31,156 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 62) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364

Lifecycle of a Request

TODO

Manager

The mod_cluster manager runs inside a virtual host. The manager is available over HTTP at http://<virtual-host-ip-address>:<virtual-host-port>/mod_cluster-manager


Balancer

TODO: what is a "balancer". There's a default one, whose default name is "mycluster". The name of the balancer can be specified by the back-end nodes. What is it? What is its function. Represent it on the diagram.


balancer://<balancer-name> is used in ProxyPass directives.


Places in which a balancer can be configured:

Worker Node

Domain

What is a domain?

Modules

mod_cluster_slotmem

mod_manager

mod_manager Configuration

mod_proxy_cluster

mod_proxy_cluster cannot work correctly if mod_proxy's mod_proxy_balancer is loaded, so mod_proxy_balancer must be removed from the httpd configuration.

mod_proxy_cluster Configuration

mod_advertise

mod_advertise multicasts the VirtualHost where is configured. It must be the same VirtualHost where mod_manager is defined.

mod_advertise Configuration

Dependency on mod_proxy

TODO

  • Why are mod_proxy.so and mod_proxy_ajp.so and how are they used?
  • Are there any mod_proxy modules that must be removed?

Organizatorium

Initialization

Upon the initialization of the mod_cluster service on the JBoss node, it sends the following sequence of requests:

  • INFO /
  • CONFIG /JVMRoute=webr01&Port=8009&Host=192.168.0.147&Type=ajp&StickySessionForce=No&Maxattempts=1
  • At this moment the balancer is created and the corresponding worker is initialized in each existing httpd child process.
  • STATUS /JVMRoute=webr01&Load=-1 - periodic status updates + periodic ajp_cping_cpong initiated by the web server. Not sure at this point who initiates who, and who answers who - they seem to be related.
  • proxy_cluster_watchdog_func (?)

Upon the deployment of a new application, the node sends the following sequence: