如何在Apache,Mod_JK中设置会话粘性?

问题描述 投票:0回答:1

[当我尝试在worker.properties中启用会话粘性时,它是在单个用户登录后一次在两个实例中写入日志。每个请求是否将在会话粘性中分开处理?在这里如何在特定时间段内管理单个用户到特定服务器?请帮助我在一个环境(JBoss 7,Apache Webserver,Mod_JK)中配置它。

[当我尝试在worker.properties中启用会话粘性时,它是在单个用户登录后一次在两个实例中写入日志。每个请求是否将在会话粘性中单独处理?...

apache jboss session-cookies session-state mod-jk
1个回答
0
投票
# Configuration directives valid for mod_jk version 1.2.28 and later.
#

# Define list of workers that will be used for mapping requests
worker.list=loadbalancer,status

# Define Node1
# Define template worker
#worker.template.port=8444
#worker.template.type=ajp13
worker.template.ping_mode=A
worker.template.reply_timeout=10000
worker.template.socket_connect_timeout=10000
# Not necessary to specify connection_pool_timeout with worker mpm 
#worker.template.connection_pool_timeout=600

# Referencing the template worker properties makes the workers.properties
# shorter and more concise.
#worker.node1.reference=worker.template


# Define Node1
worker.node1.port=8009
worker.node1.host=App1_IP
worker.node1.type=ajp13
worker.node1.lbfactor=1
#worker.node1.cachesize=10

# Define Node2
worker.node2.port=8009
worker.node2.host=App2_IP
worker.node2.type=ajp13
worker.node2.lbfactor=1
#worker.node2.cachesize=10


#worker.node2.reference=worker.template
#worker.node2.host=localhost

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
worker.loadbalancer.sticky_session_force=1
worker.status.type=status
© www.soinside.com 2019 - 2024. All rights reserved.