Lamt based on mod_proxy load Balancing configuration

Source: Internet
Author: User

Mod_proxy Load Balancing

Lamt based on Mod_proxy scheduling

Support for Proxy_balancer_module (shared) modules based on mod_proxy load balancing

Modify mod_proxu.conf file, add two tomcat hosts, LB for load balancing name

[Root@nginx-proxy2 conf.d]# Cat mod_proxy.conf
Proxyvia on
Proxyrequests off
Proxypreservehost on
<proxy balancer://lb>
Balancermember http://10.0.0.53:8080 loadfactor=1 Route=tomcata
Balancermember http://10.0.0.54:8080 loadfactor=1 ROUTE=TOMCATB
</Proxy>
Proxypass/balancer://lb/stickysession=jsessionid
proxypassreverse/balancer://lb/

<location/>
Order Allow,deny
Allow from all
</Location>
[Root@nginx-proxy2 conf.d]#
Stickysession=jsessionid can be implemented to maintain

Modify Workers.properties, add the following, 8009 (Mod_proxy can be http and AJP)

[Root@nginx-proxy2 conf.d]# Cat Workers.properties
Worker.list=lbca,stata
Worker. tomcata.port=8009
Worker. tomcata.host=10.0.0.53
Worker. Tomcata.type=ajp13
Worker. Tomcata.lbfactor=1
Worker. tomcatb.port=8009
Worker. tomcatb.host=10.0.0.54
Worker. Tomcatb.type=ajp13
Worker. Tomcatb.lbfactor=1
Worker.lbca.type=lb
Worker.lbca.sticky_session=0
Worker.lbcA.balance_workers = TOMCATA,TOMCATB
Worker.statA.type = Status

[Root@nginx-proxy2 conf.d]#

Status information

[Root@nginx-proxy2 conf.d]# Cat mod_proxy.conf
Proxyvia on
Proxyrequests off
Proxypreservehost on
<proxy balancer://lb>
Balancermember http://10.0.0.53:8080 loadfactor=1 Route=tomcata
Balancermember http://10.0.0.54:8080 loadfactor=2 ROUTE=TOMCATB
</Proxy>
proxypass/balancer://lb/
proxypassreverse/balancer://lb/
—————————————————————— status information —————————————————————————
<Location/lbmanager>
SetHandler Balancer-manager
</Location>
Proxypass/lbmanager!
————————————————————————————————————————————————————————
<location/>
Order Allow,deny
Allow from all
</Location>

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.