以下は、使用しているehcacheの設定です。私たちはキャッシュ複製のためにJgroupsを使用します。2ノードクラスタのAWSクラウドでTCPが動作しないEhcache Jgroupsレプリケーション
ehcache.xml
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="1200"
timeToLiveSeconds="86400"
overflowToDisk="true"
diskSpoolBufferSizeMB="30"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true,replicatePuts=true,replicateUpdates=true,replicateUpdatesViaCopy=true,replicateRemovals=true" />
</defaultCache>
jgroups_tcp_config.xml我々は、ノードがクラスタ化取得されていることがわかりますログからの最初
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.0.xsd">
<!--Configure node ip inside bind_addr-->
<TCP bind_addr="host1" bind_port="7831" max_bundle_size="9999999"/>
<!--Configure nodes inside 'initial_hosts' property-->
<TCPPING timeout="3000" initial_hosts="host1[7831],host2[7831]" port_range="1" num_initial_members="3"/>
<FRAG2 frag_size="9999999"/>
<MERGE3 max_interval="30000" min_interval="10000"/>
<FD timeout="3000" max_tries="10"/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK use_mcast_xmit="false" exponential_backoff="500" discard_delivered_msgs="false"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="5000" view_bundling="true"/>
</config>
。また、メッセージがノード間で複製されていることがわかります。しかししばらくすると、メッセージは複製されなくなり、誤動作を招くことがあります。私たちが使っているjgroups設定に問題はありますか?
また、NAKACK2を使用してみましたが、メッセージはノード間で複製されません。上記の設定でNAKACKをNAKACK2に置き換えました。どこが間違っているのか分かりません。
以下のリンクをクリックすると、この問題に対処できます。 –
http://www.jgroups.org/manual/html/protlist.html –
http://vertx.io/docs/vertx-infinispan/java/ –