开发那边说 Session 是单机模式,他们没有做任何处理
所以就只有运维处理 Session 了
目前在前台能看到 session 已经以带了 node 标签,但是还是会掉 session
JBoss 集群配置的 Session 复制
Linux 下 Jboss7 的安装配置和使用
项目包以 ROOT.war 发布
Session 相关配置
节点一:
节点名字
Session 复制相关
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster" proxy-list="192.168.1.242:6666" advertise-security-key="8l0zmrYA+Ft6/ht2U3QvPRRfKT9V">
<dynamic-load-provider>
<load-metric type="busyness"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
instance-id
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
节点二:
节点名字
<server name="index-node2" xmlns="urn:jboss:domain:1.2">
Session 复制相关
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster" proxy-list="192.168.1.242:6666" advertise-security-key="8l0zmrYA+Ft6/ht2U3QvPRRfKT9V">
<dynamic-load-provider>
<load-metric type="busyness"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
instance-id
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
mod_cluster
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
MOD_CLUSTER_ADDS
Adjust to you hostname and subnet.
Listen 192.168.1.242:6666 ManagerBalancerName mycluster ServerName 192.168.1.242 Order deny,allow Deny from all Allow from 192.168.1.KeepAliveTimeout 300
MaxKeepAliveRequests 0
#ServerAdvertise on http://@IP@:6666
AdvertiseFrequency 5
AdvertiseSecurityKey 8l0zmrYA+Ft6/ht2U3QvPRRfKT9V
#AdvertiseGroup @ADVIP@:23364
EnableMCPMReceive
AllowDisplay On
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Order deny,allow
Deny from all
Allow from 192.168.1.
</Location>
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于