Detailed configuration of balanced load cluster system based on JBoss Mod_cluster

Source: Internet
Author: User
Tags jboss node server

The configuration of Balanced load cluster system based on JBoss Mod_cluster JBoss Mod_cluster is the newest open source project for cluster and balanced load, and can be very good with Tomcat, JBoss Web Server, JBoss J2 EE application server with the cluster distributed system, compared with the traditional APACHE+JK balanced load scheme, Mod_cluster has the following advantages: 1. Dynamic management of cluster nodes, traditional apache+mod_   JK Management cluster nodes need to be configured Httpd,mod_cluster most of the configurations are placed on the cluster node application server, and the termination or addition of a single node does not affect the overall system's operation.   2. Server-side load balancing algorithm, compared with traditional httpd, this algorithm is more powerful and accurate.   3. Fine-grained Network application lifecycle control, traditional proxy method can not distinguish a nonexistent resources, this will lead to 404 errors, mod_cluster to the problem of a perfect solution.   4. A variety of cluster support, mod_cluster not only rely on AJP, relatively mod_jk, it supports HTTP, HTTPS, AJP.      Let's go, here we start mod_cluster trip. First, let us go to the JBoss website to download Mod_cluster, the latest version is Mod_cluster 1.0.0 GA, download address: http://www.jboss.org/mod_cluster/downloads/latest/? Action=a&windowstate=maximized can see Mod_cluster versions of most operating systems, and there may be subtle differences in the configuration of different systems, this article only takes the LINUX2 x86 version as an example, in order to be as simple as possible, the Web Server uses Jboss-web-2.1.2.ga as a node server, and of course you can build your system with Tomcat or JBoss Java EE application Server. First, we download the following items: Jboss-web-2.1.2.ga.zip mod-cluster-1.0.0.ga-bin.tar.gz mod_cluster-1.0.0.ga-linux2-x86-ssl.tar.gz in the project Execute the following command in the directory where the file resides: Tar xvf mod_cluster-1.0.0.ga-linux2-x86-ssl.Tar.gz will build the/opt/jboss directory in your/opt directory, then execute: vi/opt/jboss/httpd/httpd/conf/httpd.conf edit httpd Main configuration file, add the following: LoadModule proxy_module/opt/jboss/httpd/lib/httpd/modules/mod_proxy.so LoadModule proxy_ajp_module/opt/jboss/httpd/lib/   httpd/modules/mod_proxy_ajp.so LoadModule slotmem_module/opt/jboss/httpd/lib/httpd/modules/mod_slotmem.so LoadModule manager_module/opt/jboss/httpd/lib/httpd/modules/mod_manager.so LoadModule proxy_cluster_module/opt/ jboss/httpd/lib/httpd/modules/mod_proxy_cluster.so LoadModule Advertise_module/opt/jboss/httpd/lib/httpd/modules /mod_advertise.so SetHandler Mod_cluster-manager order Deny,allow deny from all allow to all order Deny,allow De         NY from all Allow to KeepAliveTimeout maxkeepaliverequests 0 managerbalancername mycluster advertisefrequency 5 Exit VI, execute command: Unzip jboss-web-2.1.2.ga.zip tar-zxvf mod-cluster-1.0.0.ga-bin.tar.gz cp-r jboss-web-2.1.2.ga/o Pt/jboss-node1 CP MOD-CLUSTER-1.0.0.GA-BIN/JBOSSWEB-TOMCat/lib/*/opt/jboss-node1/lib vi/opt/jboss-node1/conf/server.xml Modify server.xml the corresponding label reads as follows: Add a listener: proxylist for you mod   _cluster address and port modify the following tags: save exit.   Execute command: vi/opt/jboss-node1/bin/catalina.sh set the following parameters java_opts= '-djava.net.preferipv4stack=true ' save exit.   Execute the following command: Cp-r/opt/jboss-node1/opt/jboss-node2 vi/opt/jboss-node2/conf/server.xml Modify the label to modify the Jvmroute parameter value to: VBOSS2   Note that Jvmroute represents the cluster node name, different nodes, and that name cannot be duplicated. The following starts Mod_cluster with the node application Server Cd/opt/jboss/httpd/sbin./apachectl start Cd/opt/jboss/jboss-node1/bin./startup.sh CD /opt/jboss/jboss-node2/bin./startup.sh Browser Open: Http://localhost/mod_cluster-manager See the following picture shows cluster deployment successful access system: http:/    /localhost/vboss/login/gologin.htm See your application System login interface, the system balanced load deployment success.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.