Mod cluster Concepts: Difference between revisions
Line 15: | Line 15: | ||
Questions: | Questions: | ||
* Who advertises to who? | * Who advertises to who? On what multicast address? | ||
* 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. | * 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. |
Revision as of 05:07, 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:
- Who advertises to who? On what multicast address?
- 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.
Lifecycle of a Request
TODO
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_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_advertise
mod_advertise multicasts the VirtualHost where is configured. It must be the same VirtualHost where mod_manager is defined.
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: