2011-06-20 17 views
0

私はJava EE6 EARアプリケーションを、2つのインスタンスを持つ2つのクラスタ上のWindows 2003 R2サーバー上で動作するオープンソースのGlassFish v3.1サーバーに展開しました。作業負荷を負荷分散するために、私はmod_jkでApache HTTPサーバーを使用しています。しかし、私がjkのステータスページを見ると、4つのlbfactorがすべて1であっても、各クラスタのインスタンスのうちの1つだけに作業が分散されていることがわかります。Apache mod_jk負荷分散グラスフィッシングクラスタインスタンス

worker.list=loadbalancerLocal,status 

worker.status.type=status 

worker.ViewerLocalInstance1.type=ajp13 
worker.ViewerLocalInstance1.host=localhost 
worker.ViewerLocalInstance1.port=8109 
worker.ViewerLocalInstance1.lbfactor=1 
worker.ViewerLocalInstance1.socket_keepalive=1 
worker.ViewerLocalInstance1.socket_timeout=1000 


worker.ViewerLocalInstance2.type=ajp13 
worker.ViewerLocalInstance2.host=localhost 
worker.ViewerLocalInstance2.port=8209 
worker.ViewerLocalInstance2.lbfactor=1 
worker.ViewerLocalInstance2.socket_keepalive=1 
worker.ViewerLocalInstance2.socket_timeout=1000 

worker.ViewerLocalInstance3.type=ajp13 
worker.ViewerLocalInstance3.host=localhost 
worker.ViewerLocalInstance3.port=8309 
worker.ViewerLocalInstance3.lbfactor=1 
worker.ViewerLocalInstance3.socket_keepalive=1 
worker.ViewerLocalInstance3.socket_timeout=1000 

worker.ViewerLocalInstance4.type=ajp13 
worker.ViewerLocalInstance4.host=localhost 
worker.ViewerLocalInstance4.port=8409 
worker.ViewerLocalInstance4.lbfactor=1 
worker.ViewerLocalInstance4.socket_keepalive=1 
worker.ViewerLocalInstance4.socket_timeout=1000 

worker.loadbalancerLocal.type=lb 
worker.loadbalancerLocal.sticky_session=True 
worker.loadbalancerLocal.balance_workers=ViewerLocalInstance1,ViewerLocalInstance2,ViewerLocalInstance3,ViewerLocalInstance4 

は、ここでは、スティッキーセッションがオンになっているのmod_jk

LoadModule jk_module modules/mod_jk.so 
JkWorkersFile conf/workers.properties 
# Where to put jk logs 
JkLogFile logs/mod_jk.log 
# Set the jk log level [debug/error/info] 
JkLogLevel info 
# Select the log format 
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " 
# JkOptions indicate to send SSL KEY SIZE, 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories 
# JkRequestLogFormat set the request format 
JkRequestLogFormat "%w %V %T" 

JkMount /Viewer/* loadbalancerLocal 
JkMount /Viewer loadbalancerLocal 
JkMount /jkstatus/* status 

答えて

1

のための私のhttpd configです:

JK Status page snapshot

は、ここに私のworkers.propertiesの設定です。それをオフにしてみてください。 jvmRouteも設定していれば設定を解除する必要があるかもしれません。

関連する問題