18.7. リモートキャッシュストア
RemoteCacheStore は、リモート Red Hat JBoss Data Grid クラスターにデータを保存するキャッシュローダーの実装です。RemoteCacheStore は Hot Rod クライアントサーバーアーキテクチャーを使用してリモートクラスターと通信します。
Hot Rod はリモートキャッシュストアに対して ロードバランシングやフォールトトラレンスを提供します。また、
RemoteCacheStore とクラスター間の接続を細かく調整する機能も提供します。
18.7.1. リモートキャッシュストアの設定 (リモートクライアントサーバーモード)
以下は、Red Hat JBoss Data Grid のリモートクライアントサーバーモードにおけるリモートキャッシュストアの設定例を示しています。
<remote-store cache="default"
socket-timeout="60000"
tcp-no-delay="true"
hotrod-wrapping="true">
<remote-server outbound-socket-binding="remote-store-hotrod-server" />
</remote-store>
この設定例で使用された要素とパラメーターの詳細については、「キャッシュストア設定の詳細 (リモートクライアントサーバーモード)」を参照してください。
18.7.2. リモートキャッシュストアの設定 (ライブラリーモード)
以下は、Red Hat JBoss Data Grid のライブラリーモードにおけるリモートキャッシュストアの設定例を示しています。
<persistence passivation="false"> <remoteStore xmlns="urn:infinispan:config:remote:6.0" remoteCacheName="default" fetchPersistentState="false" shared="true" preload="false" ignoreModifications="false" purgeOnStartup="false" tcpNoDelay="true" pingOnStartup="true" keySizeEstimate="62" valueSizeEstimate="512" forceReturnValues="false"> <servers> <server host="127.0.0.1" port="19711"/> </servers> <connectionPool maxActive="99" maxIdle="97" maxTotal="98" /> </remoteStore> </persistence>
この設定例で使用された要素とパラメーターの詳細については、「キャッシュストア設定の詳細 (ライブラリモード)」を参照してください。
18.7.3. リモートキャッシュストアのアウトバウンドソケットの定義
リモートキャッシュストアによって使用される Hot Rod サーバーは、
standalone.xml ファイルの outbound-socket-binding 要素を使用して定義されます。
standalone.xml ファイルにおけるこの設定の例は次のとおりです。
例18.1 アウトバウンドソケットの定義
<server>
<!-- Additional configuration elements here -->
<socket-binding-group name="standard-sockets"
default-interface="public"
port-offset="${jboss.socket.binding.port-offset:0}">
<!-- Additional configuration elements here -->
<outbound-socket-binding name="remote-store-hotrod-server">
<remote-destination host="remote-host"
port="11222"/>
</outbound-socket-binding>
</socket-binding-group>
</server>