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 without having to restart the Apache server.
As a matter of fact, here are your examples With the obvious exception of the jboss-cli one, since you are using Tomcat. The mod_cluster manager console one and the telnet one is valid though.
CONFIG
message example in particular, for instance:
{ echo "CONFIG / HTTP/1.1"; echo "Host: rhel7GAx86-64:8847"; echo "Content-Length: 115"; echo "User-Agent: Test"; echo ""; echo -e "JVMRoute=worker1&Host=192.168.1.1&Maxattempts=1&Port=8080&StickySessionForce=No&Type=ajp&ping=10&Aliases=default\c"; sleep 1;} | telnet rhel7GAx86-64:8847
Where rhel7GAx86-64:8847
is your MCMP enabled VirtualHost in Apache HTTP Server and 192.168.1.1:8080
is your worker node.
After the CONFIG
message, STATUS
messages are expected, e.g.:
{ echo "STATUS / HTTP/1.1"; echo "Host: rhel7GAx86-64:8847"; echo "Content-length: 26"; echo ""; echo -e "JVMRoute=worker1&Load=100/c"; sleep 1; sleep 1; } | telnet rhel7GAx86-64 8847
ENABLE-APP messages follows, if you wish to configure contexts.
And now, please, do explain why you need it? This statement is erroneous:
I cannot use the default ping/pong way that mod_cluster uses to identify the nodes. – DonCorleone Oct 20 at 13:36
Cping/Cpong logic is used only with AJP protocol in order to check the fitness of registered worker nodes before a request is forwarded to them. It hos nothing to do with worker nodes registering themselves with the Apache HTTP Server load balancer.
Apache HTTP Server advertises its presence via UDP multicast messages. Your Tomcat worker nodes then register themselves and their application contexts with Apache HTTP Server. AS you startup/shutdown your Tomcats or as you deploy/undeploy applications, Apache HTTP Server authomaticaly updates its list ow workers and their deployed applications, so the load balancer always knows whereto it should forward new requests.
Unless you are writing some kind of test suite, I cannot fathom what your use case could be. Thanks for sharing your thoughts.
Cheers