首页 新闻 会员 周边 捐助

apache+tomcat负载均衡访问速度变的非常慢,怎么优化?

1
[已关闭问题] 关闭于 2017-06-21 15:50
复制代码
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so


#<IfModule mpm_winnt_module>
#    ThreadsPerChild 1920
#    #MaxConnectionsPerChild
#    MaxRequestsPerChild 10000
#    #Win32DisableAcceptEx
#    AcceptFilter http None
#    AcceptFilter https None
#</IfModule>

ProxyRequests Off 
#ProxyPass / balancer://cluster/ stickysession=JSESSIONID lbmethod=byrequests
#ProxyPass / balancer://cluster/ stickysession=JSESSIONID |jsessionid nofailover=On
#ProxyPass / balancer://cluster/ stickysession=JSESSIONID lbmethod=byrequests
#ProxyPass / balancer://cluster/ lbmethod=byrequests stickysession=JSESSIONID nofailover=on timeout=5 maxattempts=3  
#ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=On 
ProxyPass "/" "balancer://cluster/" stickysession=JSESSIONID
<proxy balancer://cluster> 
     BalancerMember ajp://192.168.10.152:8009 loadfactor=1 route=tomcat2 
     BalancerMember ajp://192.168.10.39:8017 loadfactor=1 route=tomcat1 
</proxy>

#loadfactor=1
#ProxyPassReverse / balancer://proxy/
#Include conf/extra/httpd-vhosts.conf

<IfModule mpm_worker_module>
    StartServers             3
    MinSpareThreads         75
    MaxSpareThreads        250 
    ThreadsPerChild         25
    MaxRequestWorkers      400
    MaxConnectionsPerChild   0
</IfModule>

KeepAlive off
#KeepAliveTimeout 3
复制代码
问题补充:

通过apache访问速度特别慢,单个tomcat访问没毛病~

那朵云像只狗的主页 那朵云像只狗 | 初学一级 | 园豆:7
提问于:2017-03-07 15:50
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册